【发布时间】:2016-07-27 07:40:04
【问题描述】:
您好,我是 iOS 新手。
我在 ViewController1 中实现了一个表格视图。在表格视图中,我正在显示单元格的标题、详细信息和披露指示符。
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1
reuseIdentifier:MyIdentifier];
}
cell.textLabel.text =[listTableArray objectAtIndex:indexPath.row];
cell.textLabel.textColor=[UIColor grayColor];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.detailTextLabel.text=@"4mile";
return cell;
}
一切正常,现在我需要在披露指示器之前使用图像
UIImageView *accessoryView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
accessoryView.image=[UIImage imageNamed:@"list.png"];
cell.accessoryView = accessoryView;
披露指示符被图像替换。但我需要两个图像以及披露指示符,而不使用自定义单元格。
我该怎么做...?帮帮我。
谢谢
类似于截止日期,但在那个时间我需要图像
【问题讨论】:
-
请提供屏幕截图显示图像的位置
-
确实应该是自定义单元格
-
@Birendra 添加了屏幕截图
-
您好,您有解决方案吗?
标签: ios objective-c uitableview uiimageview