Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 25th, 2012  |  syntax: None  |  size: 1.27 KB  |  hits: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. UIViewAnimationTransitionCurlUp from right to left in landscape (both left and right) orientation
  2. self.oneView = [[[UIImageView alloc] initWithFrame:frame] autorelease];
  3. self.twoView = [[[UIImageView alloc] initWithFrame:frame] autorelease];
  4. [self.view addSubview:self.oneView];
  5.  
  6. [UIView beginAnimations:nil context:NULL];
  7. [UIView setAnimationDuration:1];
  8. [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
  9. [self.oneView removeFromSuperview];
  10. [self.view addSubview:twoView];
  11. [UIView commitAnimations];
  12.        
  13. self.oneView/twoView):
  14. self.containerView = [[[UIView alloc] initWithFrame:frame] autorelease];
  15. self.oneView = [[[UIImageView alloc] initWithFrame:frame] autorelease];
  16.  
  17. self.twoView = [[[UIImageView alloc] initWithFrame:frame] autorelease];
  18. [self.view addSubview:self.containerView];
  19. [self.containerView addSubview:self.oneView]
  20.  
  21. [UIView beginAnimations:nil context:NULL];
  22. [UIView setAnimationDuration:1];
  23. [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.containerView cache:YES];
  24. [self.oneView removeFromSuperview];
  25. [self.containerView addSubview:twoView];
  26. [UIView commitAnimations];
  27.        
  28. self.containerView.transform = CGAffineTransformMakeRotation(-M_PI_2);
  29. self.oneView.transform = CGAffineTransformMakeRotation(M_PI_2);