I get a thread here at [[c textLabel] setText:item];. I dont understand what I need to change in order to allow my app to run. The Thread says: Thread 1: signal SIGABRT. I can post more information if it is need please help.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [tasks count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *c= [taskTable dequeueReusableCellWithIdentifier:@"Cell"];
if (!c) {
c = [[ UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"];
}
NSString *item = [tasks objectAtIndex:[indexPath row]];
[[c textLabel] setText:item];
return c;
}
In the line :-
taskTableshould be replaced bytableView(pointing to delegate method of tableView and not tableView Directly.)