Greetings,
Problem:
I have a main view, that already is associated with a xib file, an appdelegate class, and a controller class.
Now, opening its xib file in interface builder, I add a UITableView.
Then, in its controller class, I create the IBoutlet code to use it, let’s say: tableView.
Questions:
1) Where do I go from here in order to populate that table, and then to implement methods to handle events?
2) What is the best way to create/implement a UITableView and then add it to a parent View?
Thank You very much.
Yohann T.
ps: I have looked at a couple tutorials, none showing how to hook it to a parent view.
A
UITableViewgets its data from aUITableViewDataSource, and it lets aUITableViewDelegatehandle events associated with in. Normally, your controller class will implement both of those protocols, i.e.:Then, in Interface Builder, you can make the association from the controller class to the
dataSourceanddelegateproperties of theUITableViewobject.The easiest way is with Interface Builder; drag-and-drop the
UITableViewright into your parent view.