UITabbar +模态视图控制器
我有一个 viewController,在 ParentViewController 中作为 modalViewController 呈现。 ParentViewController 有一个带有 2 个选项卡的 UITab 栏。当我将 ChildCiewController 作为 modalViewController 呈现时,ChildViewController.view 底部有 UITab 栏大小的空白区域。如何摆脱它?
InAppPurchaseViewController *purchaseViewController = [[InAppPurchaseViewController alloc] initWithNibName:@"InAppPurchaseViewController" bundle:nil];
purchaseViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:purchaseViewController animated:YES];
[purchaseViewController release];
提前致谢
I have a viewController that I am presenting as modalViewController in my ParentViewController. The parentViewController has a UITab bar with 2 tabs. When I present the ChildCiewController as modalViewController, there is blank space the size of UITab bar at the bottom of the ChildViewController.view. How to get rid of it?
InAppPurchaseViewController *purchaseViewController = [[InAppPurchaseViewController alloc] initWithNibName:@"InAppPurchaseViewController" bundle:nil];
purchaseViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:purchaseViewController animated:YES];
[purchaseViewController release];
Thanks in Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保 buyViewController.view.frame 正确(0、0、320、480)。
测试用
CGRect r = buyViewController.view.frame;
NSLog(@"frame is: %d - %d - %d -%d", r.origin.x, r.origin.y, r.size.width, r.size.height)
希望这有帮助
Be sure that purchaseViewController.view.frame is correct (0, 0, 320, 480).
Test with
CGRect r = purchaseViewController.view.frame;
NSLog(@"frame is: %d - %d - %d -%d", r.origin.x, r.origin.y, r.size.width, r.size.height)
Hope this helps