我在[[c textLabel] setText:item];處獲得了一個線程。我不明白我需要更改以允許我的應用程序運行。線程說:線程1:信號SIGABRT。如果需要請幫助,我可以發佈更多信息。不理解線程XCode
- (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;
}
請包括崩潰的全文。可能'item'不是NSString。 – jrturton