0
我試圖在我的tableView
中顯示一些文本爲subtitle
。UITableViewCellStyleSubtitle顯示不正確
這裏是我的代碼爲tableView
的一部分:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleTableIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:SimpleTableIdentifier] autorelease]; } //did the subtitle style
NSUInteger row = [indexPath row];
cell.textLabel.text = [listData objectAtIndex:row];
return cell;
cell.detailTextLabel.text = @"Hello there"; //This is not displaying...
}
}
是否有任何理由爲什麼我沒有看到字幕文本,當我運行?
噢,呃,它立即修復它。剛剛吹過我......謝謝! :) – 2010-11-02 22:20:09
@willingfamily:你應該打這個答案接受。 – 2010-11-02 23:04:51