我如何绘制多列UITableView? [英] How do I draw a multi-column UITableView?

查看:133
本文介绍了我如何绘制多列UITableView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想绘制一个多列UITableView,如下图所示,它与普通的Custom Cell不同。



我该怎么做?



解决方案

它是否可水平滚动?它看起来不那么简单。



如果它只能垂直滚动,请使用常规的UITableView。对于每一行,像往常一样使用UITableViewCell。对于每一列,只需使用一个UIButton或您喜欢的任何小部件。在你的屏幕截图中,它看起来像列,但没有列的基本概念。你可以使用Interface Builder轻松地创建自定义的UITableView单元格并加载一个自定义笔尖。看看 http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html#//apple_ref/doc/uid/TP40007451-CH7 下的title加载自定义表格 - 从笔尖文件中查看单元格。


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?

解决方案

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".

这篇关于我如何绘制多列UITableView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆