【发布时间】:2014-03-10 06:05:49
【问题描述】:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *cellidenti = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableHeaderFooterViewWithIdentifier:cellidenti];
if(cell == Nil)
{
cell= [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellidenti];
}
cell.textLabel.text = isActive?searchData[indexPath.row]:tableData[indexPath.row];
cell.detailTextLabel.text = isActive?searchNumberData[indexPath.row]:tableNumberData[indexPath.row];
return cell;
}
我没有得到完美的视图,我没有使用故事板。
【问题讨论】:
-
使用静态 NSString *cellidenti = @"Cell";
-
你想用这个做什么:
UITableViewCell *cell = [tableView dequeueReusableHeaderFooterViewWithIdentifier:cellidenti];?
标签: ios iphone uitableview