I'm a little confused how to use IndexPath to add row into TableView. In first i init:
tableView = [[UITableView alloc] initWithFrame:self.view.bounds];
//rows code here
[self.view addSubview:tableView];
Now between this two i would like to add some row to my table View. I have an NSArray with NSStrings contains elements name.
So i try this:
[[self tableView] beginUpdates];
[[self tableView] insertRowsAtIndexPaths:(NSArray *)myNames withRowAnimation:UITableViewRowAnimationNone];
[[self tableView] endUpdates];
Then I've read that I should first add this somehow to UITableViewDataSource. So i declared it wrong? I'm asking becouse i'd rather avoid unnecessary passing data.