【发布时间】:2011-02-23 09:41:06
【问题描述】:
我正在尝试使用自定义单元格, 我的自定义单元格大小为 320*220 像素。 我的桌子大小是 320* x 1500,足够大 我已将自定义单元格的视图按比例设置为填充模式。 但是当我使用自定义单元格填充表格时,我看到的只是第一行。我总共有四行要以自定义方式填写。但是它们重叠了,我看不到任何桌子.. 他们确实看起来,但重叠,任何提示..关于它为什么会发生 我需要对笔尖进行更改吗?
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 静态 NSString *CellIdentifier = @"CustomCell";
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
for (id oneObject in nib)
if ([oneObject isKindOfClass:[CustomCell class]])
cell = (CustomCell *)oneObject;
}
cell.iconImage.image = [UIImage imageNamed:[NSString stringWithFormat:@"beach%d.jpg",indexPath.row+1]];
cell.title.text=[[RArrray objectAtIndex:indexPath.row] objectForKey:@"Beach"];
return cell;
}
【问题讨论】:
标签: iphone iphone-sdk-3.0