- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
self.cellIdentifier = [self.brain returnCellIdentifier:indexPath];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:self.cellIdentifier];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:self.cellIdentifier];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
cell.textLabel.text = [self.brain enchantmentCellText:indexPath];
return cell;
}
我不知道爲什麼我得到這個錯誤。該錯誤似乎來自我的光標所在的行。我怎樣才能解決這個錯誤:「被調用的對象類型NSString不是函數或函數指針」錯誤?
Semantic issue
Called object type 'NSString *' is not a function or function pointer
請將文本放入問題的正文中。截圖所做的唯一工作就是難以閱讀。 – 2012-01-07 04:56:02
爲什麼你有一個屬性'self.cellIdentifier'?這可能是一個局部變量。 – 2012-01-07 05:46:32
你確定這是正確的嗎?這裏的含義是你有類似'foo(bar)'的代碼,其中'foo'應該是一個函數/函數指針,但實際上是一個'NSString *'。 – 2012-01-07 05:47:39