0
差異這是我的代碼如何創建單元:UITableViewCell問題。在顯示的iOS 7和iOS 6
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *cellIdentifier = @"cellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell)
{
cell = [[[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil] lastObject];
}
UIImageView * imageView = (UIImageView *)[cell viewWithTag:1];
imageView.image = [UIImage imageNamed:@"nature.jpg"];
UILabel *nameLabel = (UILabel *)[cell viewWithTag:2];
nameLabel.text = @"Some text";
UILabel *priceLabel = (UILabel*)[cell viewWithTag:3];
priceLabel.text = [_prices objectAtIndex:indexPath.row];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
我從筆尖創建:
但也有適用於iOS 7之間的差別iOS 6中採取下面的截圖來看看:
我也有多個單元格顯示在iOS 6和iOS 7上的問題。不知道如何解決它們。也許蘋果會做一些事情來解決這些問題。分組表在iOS 7中也顯示爲不同。有人找到了解決方法? –
@benyboariu你解決了你的問題嗎? –
不,還沒解決。 –