如果可以将导航控制器动画更改为某种东西,而不是新视图只是滑到视图上,我会很高兴,因为新视图滑动时,当前视图会滑落......
我在这里有这个功能,它只是检测我的滑动,然后像普通的导航控制器一样为视图设置动画......但我希望我能在你的帮助下解决其他问题。
// 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];
}
}
}