6
Làm cách nào để vô hiệu hóa người dùng có thể di chuyển ô sang các phần khác? Tôi không muốn hiển thị một cảnh báo mỗi lần;)Không cho phép di chuyển đến một phần khác
Thanks: D
Làm cách nào để vô hiệu hóa người dùng có thể di chuyển ô sang các phần khác? Tôi không muốn hiển thị một cảnh báo mỗi lần;)Không cho phép di chuyển đến một phần khác
Thanks: D
Thực hiện phương pháp targetIndexPathForMoveFromRowAtIndexPath đại biểu:
- (NSIndexPath *)tableView:(UITableView *)tableView
targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath
toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath
{
if (proposedDestinationIndexPath.section != sourceIndexPath.section)
{
//keep cell where it was...
return sourceIndexPath;
}
//ok to move cell to proposed path...
return proposedDestinationIndexPath;
}
này giúp tôi. Cảm ơn bạn. – AechoLiu