草庐IT

UIGridView

全部标签

iphone - 来自数组的 UIGridView

我正在使用UIGridViewRepo从提要创建图像的GridView。但是当我使用以下代码时,我得到了填充所有网格的相同图像。-(UIGridViewCell*)gridView:(UIGridView*)gridcellForRowAt:(int)rowIndexAndColumnAt:(int)columnIndex{Cell*cell=(Cell*)[griddequeueReusableCell];if(cell==nil){cell=[[Cellalloc]init];}NSString*imageLink=[itemobjectForKey:@"link"];NSURL*

ios - 在uigridview中的行和列设置图像

我正在使用UIGridView,因为GridView将显示在View中,有2列等等......我只是使用UIImageView,这样我的图像就设置在行索引的每一行和索引的列上这是我的代码:-(void)viewDidLoad{[superviewDidLoad];//Doanyadditionalsetupafterloadingtheviewfromitsnib.////img_ary=[[NSArrayalloc]init];//img_ary=[NSArrayarrayWithObjects:@"car-image.png",@"slider-image.png",@"car-i