Posted By

espinallab on 04/14/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

dvel


Loading ViewController with CoreAnimation


 / Published in: Objective C
 

  1. #pragma mark -
  2. #pragma mark Puzzles
  3. -(void)openPuzzles {
  4. if (myPuzzleDelegate == nil) {
  5. myPuzzleDelegate = [[PuzzleDelegate alloc] initWithNibName:@"PuzzleMainView" bundle:nil];
  6. [self.view addSubview:myPuzzleDelegate.view];
  7. [myPuzzleDelegate initWithParent:self];
  8. myPuzzleDelegate.view.alpha = 0.0;
  9. [UIView beginAnimations:nil context:NULL];
  10. [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
  11. [UIView setAnimationDelegate:self];
  12. [UIView setAnimationDidStopSelector:@selector(puzzlesFadedIn:finished:context:)];
  13. [UIView setAnimationDuration:0.5];
  14. myPuzzleDelegate.view.alpha = 1.0;
  15. [UIView commitAnimations];
  16. }
  17. }
  18.  
  19. -(void)puzzlesFadedIn:(NSString*)animationID finished:(NSNumber*)finished context:(void*)context {
  20. //
  21. }

Report this snippet  

You need to login to post a comment.