TableView进阶2之cell.accessoryType
1. 附加样式有以下五种
cell.accessoryType = UITableViewCellAccessoryNone; //无附加样式
cell.accessoryType = UITableViewCellAccessoryDetailButton; //附加详情按钮
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; //附加展开按钮
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; //附加详情展开按钮
cell.accessoryType = UITableViewCellAccessoryCheckmark; //附加对号标记
配图:
2. 附加样式按钮的使用
实现tableView代理方法,跳转详情界面什么的
//附加按钮点击action
-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath{
NSLog(@"row==%ld",indexPath.row);
}