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);}
新聞熱點
疑難解答