Adding columns and rows to table in iphone?
Is there a way in which a table can be made of variable rows and columns having text fields where data can be entered.UIt开发者_高级运维ableView have only 1 column and not more than 1 column.
Thanks
Have a look at this post for some sample code about drawing a grid in your table view: Drawing a Grid in a UITableView. This is one possibility to customize a table view so that it shows multiple columns.
The sample uses UILabel
objects to fill the individual cells. So you might also find an easy way to make them appear editable (or use UITextField instead of UILabel in ableView cellForRowAtIndexPath
).
you can customize your UITableViewCell to behave as if they were multiple column, but it is quite unusual to edit cell directly.
Better handle cell selection, then display a detailed view you can edit.
精彩评论