我有一个应用程序使用UITabBarController,并且我有另一个视图需要从标签栏控件后面向上滑动,但是在标签栏的内容前面。如果还不清楚,可以想象一个广告在标签栏应用程序中滑动,除了标签栏按钮之外,该应用程序出现在所有内容之前。使用UITabBarController添加持久UIView
到目前为止,我有一些代码看起来像这样,但我愿意去改变它,如果有更好的方法来做到这一点...
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];
目前aboutView是的UIView的子类,坐在在底部的起始位置,但它隐藏了tabBarController。我怎样才能改变这个让标签在最前面,但仍然有其他内容前的aboutView?
真棒。你是我的英雄 – shulmey 2011-03-17 00:32:05
@ user663222没问题:)很高兴这是有用的。 – RedBlueThing 2011-03-17 00:54:50