Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display the UITableView programmatically?

Tags:

People also ask

How do I get indexPath from cell Swift?

add an 'indexPath` property to the custom table cell. initialize it in cellForRowAtIndexPath. move the tap handler from the view controller to the cell implementation. use the delegation pattern to notify the view controller about the tap event, passing the index path.

What is the difference between UITableView and UICollectionView?

Tableiw is a simple list, which displays single-dimensional rows of data. It's smooth because of cell reuse and other magic. 2. UICollectionView is the model for displaying multidimensional data .


I want to ask a question about the UITableView of the objective C. I am writing a program and I would like to create the UI programmatically. However, I don't know how to display the table programmatically. I already have a NSMutableArray to store the displayed data. And I create a object UITableView *tableData;, what should I do for the next step? Thank you very much.