小编shu*_*mey的帖子

使用UITabBarController添加持久性UIView

我有一个使用UITabBarController的应用程序,我有另一个视图需要从标签栏控件后面向上滑动,但在标签栏的内容前面.如果这还不清楚,想象一个广告在标签应用程序中向上滑动,该应用程序出现在除标签栏按钮之外的所有内容之前.

到目前为止,我的代码看起来像这样,但如果有更好的方法,我愿意改变它...

tabBarController.viewControllers = [NSArray arrayWithObjects:locationNavController, emergencyNavController, finderNavController, newsNavController, nil]; 

aboutView = [[AboutView alloc] initWithFrame:CGRectMake(0, window.frame.size.height - tabBarController.tabBar.frame.size.height - 37 ,
                                                        320, window.frame.size.height - tabBarController.tabBar.frame.size.height)];


[window addSubview:tabBarController.view];    // adds the tab bar's view property to the window
[window addSubview:aboutView]; // this is the view that slides in
[window makeKeyAndVisible];
Run Code Online (Sandbox Code Playgroud)

目前aboutView是UIView的子类,位于底部的起始位置,但它隐藏了tabBarController.如何更改此选项以使选项卡位于顶部,但仍然在其他内容前面显示aboutView?

iphone objective-c uitabbarcontroller uiview depth

6
推荐指数
1
解决办法
2339
查看次数

标签 统计

depth ×1

iphone ×1

objective-c ×1

uitabbarcontroller ×1

uiview ×1