1
아래의 코드를 사용하여 테이블에서 액세서리 확인 표시를 사용하여 셀을 검사 할 때버튼 셀을 확인하는 동안 사용자 정의 셀에서 버튼 이미지가 사라집니다.
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
그런 다음 해당 셀의 하위 범주를 확장하려면 셀 단추를 클릭 한 다음 단추 이미지가 사라집니다. 선택한 셀 아래에 새 셀을 삽입하려면 아래 코드를 사용합니다.
[FieldtableView beginUpdates];
for(int i=1;i<=cnt;i++)
{
NSIndexPath *pathforadd = [NSIndexPath indexPathForRow:i inSection:[sender tag]];
[FieldtableView insertRowsAtIndexPaths:[NSArray arrayWithObject:pathforadd] withRowAnimation:UITableViewRowAnimationFade];
}
[FieldtableView endUpdates];