相关疑难解决方法(0)

"isEqualToString"Cocoa错误

我在控制台中收到错误:

2009-05-30 20:17:05.801 ChuckFacts [1029:20b]*** - [Joke isEqualToString:]:无法识别的选择器发送到实例0x52e2f0

这是我的代码,我相信错误来自:

- (UITableViewCell *)tableView:(UITableView *)tableView 
     cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Joke";  
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) { 
    [[NSBundle mainBundle] loadNibNamed:@"TableCell" owner:self options:nil]; 
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero 
                                   reuseIdentifier:CellIdentifier] autorelease];
    cell = tableCell;
}

NSString *jokeText = [jokes objectAtIndex:indexPath.row];
UILabel *jokeTextLabel = (UILabel*) [cell viewWithTag:1];
jokeTextLabel.text = jokeText; 
NSString *dateText = formattedDateString;
UILabel *dateTextLabel = (UILabel*) [cell viewWithTag:2];
dateTextLabel.text = dateText;
[self todaysDate];
return cell;
}
Run Code Online (Sandbox Code Playgroud)

"笑话"是一个充满笑话的阵列,你需要知道 …

iphone cocoa exception objective-c

3
推荐指数
1
解决办法
7314
查看次数

标签 统计

cocoa ×1

exception ×1

iphone ×1

objective-c ×1