How do I draw a multi-column UITableView?

霸气de小男生 提交于 2019-12-07 23:58:37

问题


I want to draw a multi-column UITableView like the picture below, which is different than a common Custom Cell.

How do I do this?


回答1:


Is it horizontally scrollable? It doesn't look so.

If it's only vertically scrollable, use a regular UITableView. For each row, you use a UITableViewCell as usual. For each column, just use a UIButton or any widget that you like. In your screenshot, it looks like columns but there is no underlying concept of columns.

You can easily create custom UITableView cells by using Interface Builder and loading a custom nib. Look at http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html#//apple_ref/doc/uid/TP40007451-CH7 under the title "Loading Custom Table-View Cells From Nib Files".




回答2:


http://usxue.is-programmer.com/posts/14176.html it will help you may be.

you can also see this link http://www.iphonedevx.com/?p=153




回答3:


If you really want to use UITableView, just add 6 items per row in your UITableViewCell.



来源:https://stackoverflow.com/questions/8634004/how-do-i-draw-a-multi-column-uitableview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!