开发者

iPhone how i can I do multiple columns in UITableView/UIImageView

How I can implement the following screen.

iPhone how i can I do multiple columns in UITableView/UIImageView

What are ui controls can be used for implementation the same开发者_开发技巧 grid behavior? I'm seeing UITableView, but it doesn't support multi columns. How can be?

Thanks, Anatoly


How about a UITableViewCell with three (if you count the stars it'll make six) UIImageViews and three UILabels?


You could put three UIImageViews and three UILabels below the images per cell.

Here's a tutorial on how to draw grids in a UITableView.

But for your case I'd do it with interface builder for a custom UITableViewCell:

iPhone how i can I do multiple columns in UITableView/UIImageView


Basing from your requirements, I think you should use AQGridView,

I found it here: https://github.com/AlanQuatermain/AQGridView You can download the sample code.

I've downloaded the sample code and run it on my iPad 5.0 Simulator, here is the screenshot:

iPhone how i can I do multiple columns in UITableView/UIImageView

and what amazed me most is that when you switch your device to landscape mode, it automatically displays the images in four columns (to utilize the space):

iPhone how i can I do multiple columns in UITableView/UIImageView

I hope this helps.


Customizing UITableViewCell to contain many cells inside and rendering each cell as needed.

Anyway, it's not a good practice to do that in your controller. You should build an external control to handle it.

Please take a look at my UIGridView. It uses the explained technique and produce the result that you want.

Here is the screenshot:

iPhone how i can I do multiple columns in UITableView/UIImageView

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜