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 UILabel
s. 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 frame
s of the UILabel
s 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.
精彩评论