开发者

how to add UIImage view inside table cells for iphone

i want to add a UIimabeView inside table view cells to disyplay images (5 images on tap) no is i开发者_如何学Got pissible to show Images in table cells??/


Yes it is possible. You can add it to the cell's contentView in TableView's cellForRowAtIndexPath method.

Alternatively, you can create a custom tableview cell if you want to avoid the hassle of adjusting the imageView's positions in the code and you can just set the images for these image view in the cellForRowAtIndexPath method.


If you want to add views to a cell, add them to the contentView of the cell:

UIImageView *myImageView = ...;
[cell.contentView addSubview:myImageView];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜