IOS开发中UITableView和UITableViewCell的几种样式
cell.textLabel.text = shop.title;
cell.detailTextLabel.text = shop.desc;
//cell.imageView是只读的,可以给cell.imageView.image赋值
cell.imageView.image = [UIImage imageNamed:shop.iconName];
// 右边的箭头
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
// 设置最右边的显示什么控件
cell.accessoryView = [UIButton buttonWithType:UIButtonTypeContactAdd];
时间: 2024-10-10 17:57:07