This code only works on touch inside, and not touch drag inside... any ideas why not???
Nino
Quote:
Originally Posted by Momeks
it's very simple first of all add a UIViewController [check the xib too ] to your project and . let's write the code
Assuming i have a button on the FirstViewController , ok ,
FirstViewController.h :
Code:
-(IBAction)gotoViewTwo:(id)sender ;
FirstViewController.m :
#import "FirstViewController.h"
#import "SecondViewController.h"
Code:
-(IBAction)gotoViewOne:(id)sender
{
SocondViewController *viewTwo= [[SecondViewController alloc] initWithNibName:@"SocondViewController " bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[self.view addSubview:viewTwo.view];
[UIView commitAnimations];
}
write above codes for button on the view 2 :
Code:
#import "SecondViewController.h"
#import "FirstViewController.h"
FirstViewController *viewOne= [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[self.view addSubview:viewOne.view];
[UIView commitAnimations];
}
|