iOS Swift 2 UISplitViewController opens detail screen on master's place when on iPad/ iPhone 6+

不问归期 提交于 2019-12-24 11:54:05

问题


I am having the bellow described problem with getting UISplitViewController to work on xCode 7.1.1, iOS 9.1. I have implemented the Split VC with both master and detail being a navigation controller. I have a list of tasks and then a detail task view, also a 'add new task' VC. Everything works fine on iPhone, however when I try to run on iPad (any version) or iPhone 6+/6S+, I get the following issue. Initially when I select a task from Master VC, it will load in the same Master VC with a weird grey border. Then when trying to add a new task, screen would also load in the Master VC. Any ideas what I might have done wrong? Just to clarify, I have compared my project to Apple's 'Master-Detail' template a few times and read around the internet for 2 days now... to no avail.

Here are images of what happens on iPad:

App with weird grey border when detail view is loaded within the master view

Add new item VC opening within Master VC

Maybe I am doing something wrong, or have adopted some misconception about how Split View Controller works, can anyone shed some light on this? Thank you in advance!

来源:https://stackoverflow.com/questions/33869182/ios-swift-2-uisplitviewcontroller-opens-detail-screen-on-masters-place-when-on

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