UITabbar +模态视图控制器

发布于 2024-11-02 01:49:02 字数 640 浏览 10 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

入怼 2024-11-09 01:49:02

确保 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文