0
我想從另一個UIViewController
實例化SplitViewController
;但我無法將MasterViewController
顯示在我的iPad
上。在分割視圖控制器主視圖控制器未顯示
MasterViewController
和DetailViewController
已使用故事板添加。
以下是我已經實現了代碼:
let storyboard = UIStoryboard(name: "Main_Ipad", bundle: nil);
let navigationController = storyboard.instantiateViewControllerWithIdentifier("navigationID") as? UINavigationController;
let splitViewController = navigationController?.viewControllers[0] as? UISplitViewController
self.view.window!.rootViewController = navigationController;
splitViewController?.preferredDisplayMode = .PrimaryHidden
splitViewController?.delegate = self
self.view.window?.makeKeyAndVisible()
縱向? –
我將它作爲僅用於iPad設備的橫向。另外當我添加背景顏色viewdidload它的作品;但沒有顯示任何tableview或按鈕 – lifemoveson