开发者

Is UINavigationController fullscreen only?

I'm working from the Navigation-based Application template for iPad. I need a NavigationController presenting my playlist hierachy in a TableView.

Works out of the book. No problem.

Is UINavigationController fullscreen only?

Now I want this view to take only part of the screen, so, in my AppDelegate I say:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window.rootViewController = self.navigationController;
    self.window.rootViewController.view.frame = CGRectMake(0,352,384,1024-352);
    [self.window makeKeyAndVisible];
    return YES;
}

This works. However, now the title bar overlaps part of the TableView.

Is UINavigationController fullscreen only?

I could move the table view downwar开发者_Go百科ds, but this would make the "pop-in" animation of the next view coming in look somewhat strange, because the animation will return to the overlapping version, then animate, then de-overlap after the animation has finished.

I'm looking for a way to move the title bar of the NC up. Any ideas?


You can't just set resize rootViewController since the screen will has empty areas! You may try to use UISplitController or start with empty view application template and then add UIView objects as many as you want to your XIB file and layout them out as you desire then add a UINavigationController to one of them instead of rootViewController.


try this

self.window.rootViewController.view.frame = CGRectMake(0,0,384,1024-352);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜