2009-06-09 5 views

Répondre

1

Avez-vous regardé le code d'Apple? C'est assez bien aménagé et a une animation flip. Si vous créez un projet utilitaire par défaut, ce code n'a à peu près rien d'autre que du code inversé.

La génération d'une animation flip est très facile. Vous supprimez simplement votre vue principale (dans votre cas, l'UITableView) et ajoutez votre nouvelle vue au superView tout à l'intérieur d'un bloc d'animation UIView:

// start the animation block [UIView beginAnimations:nil context:NULL]; 

// Specify a flip transition 
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; 

[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES]; 
[myAppsWindow removeSubView:myUITableView]; // obiously replace these views with the correct views from your app. 
[myAppsWindow addSubview:mybackView]; // you should build this view with your details in it.  
// commit the animations. The animations will run when this invocation of the runloop returns. 
[UIView commitAnimations]; 
Questions connexes