开发者

DetailView not loading in SplitViewController

i managed using a SplitViewController in a TabBarApplication. The problem now is, trying to start the Application (the SplitViewController is the first View in my TabbarApp) in Landscape mode the Detail View gets not loaded. Starting it in Portrait works fine, also after pushing my iPad to Landscape after starting in Portrait.

Here 2 Links:

Starting in Portrait, switching to Landscape

Starting in Landscape

i've modified the willShowViewController method, because i couln't even start it in landscape

- (void)splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {

    NSMutableArray *items = [[toolbar items] mutableCopy];
    //XLog("second: %i",[items count]);
    if([items count] > 0) {
        [items removeObjectAtIndex:0];
        [toolbar setItems:items animated:YES];
    }
    [items release];
    self.popoverController = nil;

}

the if query prevents my app from crashing in landscape.

i have no idea why my detailviewcontroller doesn't show up and my rootviewcontroller of the splitview shows up over the complete width.

any ideas开发者_JAVA百科?

thanks!


Specially in iOS 4.2 I believe that is a bug. I have found a work-around and wrote it here:

How to restrict my app to landscape mode?

Hope it helps

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜