UISplitViewController and UINavigationController doesn't work properly with multiple storyboards

泪湿孤枕 提交于 2019-12-12 06:36:04

问题


I'm trying (for experiment) to work with multiple storyboards. The first storyboard (starts at startup) contains only one view controller that executes some code and download json data from a website.

When finish the download task, the view controller (of first storyboard) set the entry Point of Second storyboard as root view controller after instantiating it.

UIStoryboard *mainSB = [UIStoryboard storyboardWithName:@"SecondStoryboard" bundle:[NSBundle mainBundle]];
    UITabBarController *rootTabBarController = (UITabBarController *)[mainSB instantiateInitialViewController];

    dispatch_sync(dispatch_get_main_queue(), ^{

        ...

        self.view.window.rootViewController = rootTabBarController;

This Second story board contains a tabbar controller with a split view controller inside it:

All works but there is a strange behaviour of navbar controller inside the splitview controller. Its back button works if pressed but doesn't display properly because there is only the "back" text without the left arrow.

]3

Only after few minutes and some transitions between master and detail view the back button display properly with the left arrow.

(All works correctly if I use only the Second storyboard from the startup)

I Know that in this case I can use only one storyboard but I want to know if is not correct to work in this way with multiple storyboards or if it's a bug.


回答1:


With the new Xcode 7 Beta and iOS 9 all perfectly work.

Whit the same configuration of files the chevron of navigation controller display properly. I don't know why, Apple in this WWDC has released the storyboard reference, but I think that was a bug of UISplitViewController.



来源:https://stackoverflow.com/questions/30689413/uisplitviewcontroller-and-uinavigationcontroller-doesnt-work-properly-with-mult

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!