Loading ViewController with CoreAnimation


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.