更改pushViewController动画方向

时间:2012-12-16 15:06:31

标签: xcode animation uinavigationcontroller pushviewcontroller

我读了很多关于伪造pushViewController的动画,但我想知道是否有办法改变实际的动画,因为我想使用navBar和navigationController的BackButton。 目前我正在使用它来制作动画:

- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:YES];
[views setContentSize:CGSizeMake(self.view.bounds.size.width, self.view.bounds.size.height -40)];
CGRect frame = views.frame;
frame.origin.y = - self.view.bounds.size.height;
[UIView beginAnimations:@"viewSlideUp" context:nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
views.frame = frame;
[UIView commitAnimations];
}

但是我得到了重叠效果,所以我的视图不会向上滑动,视图会滑到左上角。

有没有人处理过这个问题?感谢任何帮助!

0 个答案:

没有答案
相关问题