垃圾代求就解脱

iOS 码拜 7年前 (2015-11-08) 642次浏览
    switch (indexPath.row) {
case 0:
[markImage setImage:[UIImage imageNamed:@”中国台湾”]];
break;
case 1:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 2:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 3:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 4:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 5:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 6:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 7:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 8:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 9:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 10:
[markImage setImage:[UIImage imageNamed:@”日本”]];
break;
case 11:
[markImage setImage:[UIImage imageNamed:@”日本”]];
break;
case 12:
[markImage setImage:[UIImage imageNamed:@”中国台湾”]];
break;
case 13:
[markImage setImage:[UIImage imageNamed:@”中国台湾”]];
break;
case 14:
[markImage setImage:[UIImage imageNamed:@”中国”]];
break;
case 15:
[markImage setImage:[UIImage imageNamed:@”中国”]];
break;
case 16:
[markImage setImage:[UIImage imageNamed:@”中国”]];
break;
case 17:
[markImage setImage:[UIImage imageNamed:@”中国”]];
break;
case 18:
[markImage setImage:[UIImage imageNamed:@”香港”]];
break;
case 19:
[markImage setImage:[UIImage imageNamed:@”香港”]];
break;
case 20:
[markImage setImage:[UIImage imageNamed:@”香港”]];
break;
case 21:
[markImage setImage:[UIImage imageNamed:@”香港”]];
break;
case 22:
[markImage setImage:[UIImage imageNamed:@”香港”]];
break;
case 23:
[markImage setImage:[UIImage imageNamed:@”香港”]];
break;
case 24:
[markImage setImage:[UIImage imageNamed:@”香港”]];
break;
case 25:
[markImage setImage:[UIImage imageNamed:@”日本”]];
break;
case 26:
[markImage setImage:[UIImage imageNamed:@”日本”]];
break;
case 27:
[markImage setImage:[UIImage imageNamed:@”日本”]];
break;
case 28:
[markImage setImage:[UIImage imageNamed:@”日本”]];
break;
case 29:
[markImage setImage:[UIImage imageNamed:@”日本”]];
break;
case 30:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 31:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 32:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 33:
[markImage setImage:[UIImage imageNamed:@”美国”]];
break;
case 34:
[markImage setImage:[UIImage imageNamed:@”新加坡”]];
break;
case 35:
[markImage setImage:[UIImage imageNamed:@”新加坡”]];
break;
case 36:
[markImage setImage:[UIImage imageNamed:@”欧盟”]];
break;
case 37:
[markImage setImage:[UIImage imageNamed:@”新加坡”]];
break;
case 38:
[markImage setImage:[UIImage imageNamed:@”新加坡”]];
break;
case 39:
[markImage setImage:[UIImage imageNamed:@”中国”]];
break;
case 40:
[markImage setImage:[UIImage imageNamed:@”欧盟”]];
break;
case 41:
[markImage setImage:[UIImage imageNamed:@”欧盟”]];
break;
case 42:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 43:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 44:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 45:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 46:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 47:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 48:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 49:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 50:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;
case 51:
[markImage setImage:[UIImage imageNamed:@”韩国”]];
break;

default:
break;
}

解决方案:80分
你搞了个数组arr ,arr里面存放着国家的名字,然后在cell.    .text = arr[ index.row ]。相信你能看得懂

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明垃圾代求就解脱
喜欢 (0)
[1034331897@qq.com]
分享 (0)