2
나는 아래와 같이 UITableViewController를 사용하여 여러 항목을 선택했다. 이것은 UIAlertView의 델리게이트 메소드로, UIAlertView에 Table이 있습니다.Array에 여러 개의 cell.textLabel.text를 어떻게 추가합니까?
이제 특정 선택된 indexPath.row를 배열에 추가하고 일부를 선택 취소하면 제거 할 수 있습니까?
- (void)tableAlert:(SBTableAlert *)tableAlert didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"MY INDEX PATH IS %@", indexPath);
if (tableAlert.type == SBTableAlertTypeMultipleSelct) {
UITableViewCell *cell = [tableAlert.tableView cellForRowAtIndexPath:indexPath];
if (cell.accessoryType == UITableViewCellAccessoryNone)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
[tableAlert.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
}