说起来很不一样,你需要什么,我们没有你的代码,但我会尽力帮助:试着[self presentViewController:picker animated:YES completion:nil]
改变
[self.navigationController presentViewController:picker animated:YES completion:nil]
//or [anyNavController presentViewController:picker animated:YES completion:nil]
如果没有帮助,请尝试在其中设置 ViewController 的视图(呈现)高度,viewDidLoad
或者您可以尝试在没有导航控制器的情况下呈现 newView:
newView.bounds = mainView.bounds; //newView can be nextViewController.view
newView.biunds.size.height=newView.biunds.size.height- self.navBar.bounds.size.height;//devide navBar height (you can delete this line)
newView.frame = CGRectMake(newView.frame.origin.x + 784, newView.frame.origin.y, newView.frame.size.width, newView.frame.size.height);
[mainView addSubview:newView];
/* Begin transition */
[UIView beginAnimations:@"Slide Left" context:oldView];
[UIView setAnimationDelegate:self];
[UIView setAnimationDelay:0.0f];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationDidStopSelector:@selector(slideInCompleted:finished:context:)];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
newView.frame = CGRectMake(0,0, newView.frame.size.width, newView.frame.size.height);
oldView.frame = CGRectMake(oldView.frame.origin.x - 784, oldView.frame.origin.y, oldView.frame.size.width, oldView.frame.size.height);
[UIView commitAnimations];
发表评论,你的结果如何。