I use button to switch between XIB. My function is like this:
-(IBAction)swapViews; {
SecondViewController *second2 =[[SecondViewController alloc
initWithNibName:@"SecondViewController" bundle:nil];
second2.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:second2 animated:YES];
[second2 release];
}
How I can use swipe between XIB?
To be able to swipe between the two views, you should not present them modally (
presentModalViewController).Have a look at
[UIScrollView][1]and at this simple tutorial.In short, you should create your
UIScrollView, which will manage the swipe for you, then add all the views you want to manage through swipe to theUIScrollViewas subviews.}