am i the only person who didn't know about this?
Code:
#define NextPage 101
#define PreviousPage 102
#define Suck 103
#define WaterRipple 110
//There are a few others also (105, 106, 107, proabably more)
@implementation TransitionEffectsViewController
- (void)viewDidLoad
{
UIImageView *transitionView = [[UIImageView alloc] initWithFrame:CGRectMake(50, 100, 200, 300)];
transitionView.image = [UIImage imageNamed:@"parot2.jpg"];
transitionView.tag = 88;
[self.view addSubview:transitionView];
[transitionView release];
UIButton *transitionButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[transitionButton addTarget:self action:@selector(animation) forControlEvents:UIControlEventTouchUpInside];
[transitionButton setTitle:@"Show Transition" forState:UIControlStateNormal];
[transitionButton setFrame:CGRectMake(10, 10, 200, 40)];
[self.view addSubview:transitionButton];
}
- (void)animation
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:NextPage forView:[self.view viewWithTag:88] cache:NO];
[UIView commitAnimations];
}
- (void)dealloc
{
[super dealloc];
}
@end