【发布时间】:2011-10-12 21:11:55
【问题描述】:
我尝试了以下代码,试图让自定义视图显示在标签栏控制器上方(恰好在所有标签中都有一个导航控制器)。
问题是它覆盖在导航栏的顶部,我希望将导航栏向下移动。
我尝试设置标签栏控制器的框架,但根本没有移动它。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// Add the tab bar controller's current view as a subview of the window
//self.tabBarController.view.frame = CGRectMake(0, 62, 320, 320);
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
// setting up the header view
self.headerView = [[HeaderView alloc] initWithFrame:CGRectMake(0, 20, 320, 42)];
[self.window addSubview:self.headerView];
// setting up facebook stuff
AgentSingleton *agentSingleton = [AgentSingleton sharedSingleton];
agentSingleton.facebook = [[Facebook alloc] initWithAppId:APP_ID];
return YES;
}
有什么想法吗?
【问题讨论】:
标签: iphone uinavigationcontroller uitabbarcontroller