开发者

Xcode iPhone - Create a Table (NOT a Tableview) within a view

Is it possible to create a normal data table (HTML equivalent would be ".." as I would like to display some structured information within my scroll view along with text etc and also be able to style each row etc. I开发者_如何学C would require 3 cols by numerous rows basically.


You'll need to manually create the cells using UILabels. I'd suggest making a new class LabelTable that subclasses UIView. It could take column and row counts as arguments to the init selector. At init just set the frames of the UILabels to CGRectZero, then set all the text on all the cells, then in layoutSubviews actually take care of sizing the cells and aligning them correctly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜