I want to add some data from a NSMutableArray to my UITableView. I have made an IBoutlet which is called lessonsTable. All the tutorials i can find assumes that the UITableView has its own controller, so they change a method about adding cells. But i don’t have a separate controller class for my UITableView, it is just a view floating in another controller.
I’ve tried
[lessonsTable insertRowsAtIndexPaths:appDelegate.lessonsArray withRowAnimation:UITableViewRowAnimationTop];
But it didn’t solved the problem.
lessonsArray has the data that i want to insert to my UITableView
You don’t need a dedicated view controller, but you do need to implement the
UITableViewDelegateandUITableViewDataSourceprotocols. You can’t just send an array to a table and expect it to figure out the details for you.