0

我有一个 UIViewController,它有一个父 UITabBarController。在开始时,UIViewController 位于 UITabBarController 上方。从对地址簿的调用返回后,UIViewController 位于其下方(其高度突然增加)

调用是 [self presentViewController:picker animated:YES completion:nil]

选择器是 ABPeoplePickerNavigationController

谢谢,罗伊

4

1 回答 1

-3

说起来很不一样,你需要什么,我们没有你的代码,但我会尽力帮助:试着[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];

发表评论,你的结果如何。

于 2013-08-18T07:39:35.163 回答