我有一个使用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?