Je l'ai lu vue de la table et il est l'édition de styles mais j'ai quelques problèmes car il n'y a que trois style de montage comme suit:Table Réorganiser cellule de vue sans le bouton supprimer et mettre en œuvre swipe pour supprimer des lignes
UITableViewCellEditingStyleNone
UITableViewCellEditingStyleDelete
UITableViewCellEditingStyleInsert
Je veux avoir réordonner les cellules Tableview que j'implémentés en utilisant avec succès est délégués.
-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{
return YES;
}
-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
return UITableViewCellEditingStyleNone;
}
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{
//handle the editing style
}
-(NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath{
//move cells
}
-(BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath{
return YES;
}
Je ne veux pas utiliser UITableViewCellEditingStyleDelete
car il montre un bouton circulaire rouge sur la vue de la table. Au lieu de cela, je veux glisser-à-supprimer et la fonctionnalité de réorganisation ensemble.
Y a-t-il un moyen de l'implémenter?
Avez-vous fait cela. Je dois faire la même chose –
@ParulGarg désolé pour la réponse tardive. Oui, s'il vous plaît vérifier ceci: http://stackoverflow.com/questions/31802088/reorder-tableview-cell-with-a-custom-button – Niloufar
Pour info un cookie futé a figuré un travail autour de cela http: // stackoverflow. com/questions/6097464/reordering-controls-on-uitableview-while-not-in-editing-mode/33182901 # 33182901 – Tys