I want to add a table to a view which already has a search bar and some text.
If I created a navigation based project, then I could use
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
but I can’t do that inside a view based application.
I don’t really need multiple section just the one. How do i do this?
thanks
To do this, you have to add a
UITableViewto your viewController, then define the delegate(s) of your tableview like:This way, your table view will call your class to get its data, and to know how to present them. That means your method
tableView:numberOfRowsInSection:will be called.