UITableViewCell
의 순서를 변경하고 스 와이프를 통해 삭제하여 빨간색 삭제 서클을 통해 삭제하지 않으려합니다.UITableView에서 순서 변경 컨트롤을 표시하면서 스 와이프를 사용하도록 설정
- (void)loadView
{
[super loadView];
[table setEditing:YES animated:NO];
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Perform delete here
}
}
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
// Perform move here
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
return UITableViewCellEditingStyleDelete;
}
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
또한, 나는 편집 모드를 비활성화하고 행운과 -[UITableViewCell setShowsReorderControl:YES]
를 호출 시도했습니다.
Image http://booleanmagic.com/uploads/ReorderNotDelete.png
가 그래, 난 알고 있어요 "쇼 제어 순서"와 같은 속성의 생각하는 방법을 확실하지. '링크 계정'기능이 작동하지 않았습니다. 최소한 저항의 길은 단지 새로운 계정을 만들고 임시 계정을 고아로 만드는 것이 었습니다. – rpetrich