6
Come posso disabilitare che l'utente possa spostare le celle in altre sezioni? Io non voglio mostrare un avviso ogni volta;)Non consentire che la cella venga spostata in un'altra sezione
Thanks: D
Come posso disabilitare che l'utente possa spostare le celle in altre sezioni? Io non voglio mostrare un avviso ogni volta;)Non consentire che la cella venga spostata in un'altra sezione
Thanks: D
Implementare il metodo targetIndexPathForMoveFromRowAtIndexPath delegato:
- (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;
}
Questo mi aiuta. Grazie. – AechoLiu