2009-10-08 6 views
0

iPhone Téléphone App -> Récents -> Animation totale/manquée Comment puis-je implémenter cette animation d'ajout/suppression de cellule dans mon propre UITableView? J'ai essayé ce qui suit:iPhone Téléphone App -> Récents -> Tout/Animation manquée

[tableController.aTable beginUpdates]; 
[tableController.aTable deleteSections:self.sectionIndexes withRowAnimation:UITableViewRowAnimationFade]; 
[tableController.aTable deleteRowsAtIndexPaths:smartListIndexes withRowAnimation:UITableViewRowAnimationFade]; 
[tableController.aTable endUpdates]; 

Mais ce n'est pas la même animation. J'ai essayé toutes les propriétés UITableViewRowAnimaiton. Non est exactement le même. Quelqu'un peut-il aider?

Répondre

-1

Vous êtes sur la bonne voie. Essayez de le dérouler dans des appels séparés comme celui-ci et voir si cela fait l'affaire.

[tableView deleteRowsAtIndexPaths:0 withRowAnimation:UITableViewRowAnimationFade]; 
[tableView deleteRowsAtIndexPaths:1 withRowAnimation:UITableViewRowAnimationFade]; 
[tableView deleteRowsAtIndexPaths:2 withRowAnimation:UITableViewRowAnimationFade]; 
+0

mais avec cela j'ai besoin de changer la source de données après chaque suppression? ou puis-je mettre toutes les suppressions à l'intérieur des mises à jour bein/end? – V1ru8

Questions connexes