I am woundering if its possible to change the navigation controller animation to something where instead of the new view just sliding onto the view, having the current view slide off as the new view slides on…
I have this function here, which is just detecting my swipes then animating the views like a normal navigationcontroller would do.. but I am hoping I can figure something else out with your help.
// Need to change this to work with viewArray
- (void)swipedScreen:(UISwipeGestureRecognizer*)gesture {
//Left swipe
if (gesture.direction == UISwipeGestureRecognizerDirectionLeft)
{
if (viewCount == 0)
{
viewCount += 1;
// Load a detial view into the (sub)NavController
DetailViewControllerA *detailViewA = [[DetailViewControllerA alloc] initWithNibName:@"DetailViewControllerA" bundle:[NSBundle mainBundle]];
[otherNav pushViewController:detailViewA animated:YES];
}
}
//Right swipe
else if (gesture.direction == UISwipeGestureRecognizerDirectionRight)
{
if (viewCount == 1)
{
viewCount -= 1;
[self.otherNav popViewControllerAnimated:YES];
}
}
}
You can do this with the uiView animation blocks like this one i use to show one blinking UIView
or
using below code
for flip transition
and for changing push/pop animation i use this code
enjoy Codding 🙂
Happy Codding 🙂