当我的MasterViewController出现/消失时,我正在尝试使它具有动画效果。为了隐藏我的主人,我在UISplitViewController类中使用了shouldHideViewController。
-(BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation {
return hiddenMaster;
}我的问题是:在shouldHideViewController返回YES或NO后有没有调用的方法?看起来viewWillDisappear或viewDidDisappear都没有被调用。
或者,更一般地说,当我的masterView出现/消失时,有什么方法可以让它动起来吗?
谢谢!
发布于 2013-05-23 17:12:01
你做一些类似于下面丑陋的消失方法,但我不推荐这样做。
[UIView animateWithDuration:3.5 animations:^{
[self.masterPopoverController.contentViewController.view.superview.superview setCenter:CGPointMake(-300, -300)];
} completion:^(BOOL finished) {
[self.masterPopoverController dismissPopoverAnimated:NO];
}];https://stackoverflow.com/questions/16708978
复制相似问题