0

I am porting an Android app to Swift IOS. The Android app currently employs a custom split pane view as a child activity. The functionality of the UISplitViewController fits the bill perfectly for the IOS app, however Apple state:

You cannot push a split view controller onto a navigation stack. Although it is possible to install a split view controller as a child in some other container view controllers, doing is not recommended in most cases. Split view controllers are normally installed at the root of your app’s window. For tips and guidance about ways to implement your interface,

Has anyone founs a way around this limitation using Swift?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Ratatat Richie
  • 131
  • 1
  • 10
  • What limitation? That's only a recommendation. Try it. See if it works for your needs. – rmaddy Apr 16 '16 at 17:58
  • Write your own custom container view controller or use a third party library. Apple doesn't allow this because it becomes unclear from a user perspective when you have split navigation embedded in a linear navigation stack. – beyowulf Apr 16 '16 at 18:18
  • Thanks. There's nothing unclear about a split-pane as a child controller. – Ratatat Richie Apr 16 '16 at 18:27
  • Sorry - pressed return there... nothing unclear. Mychild view needs a list of Genres on the left pane and a table of results on the right pane. Simple. Works well in Android, no confusion. I think the confusion stems from Apple messing the design up with navigation stacks. Still c'est la vie. I'll have a bash, otherwise it's two tableViews in a container - bah. – Ratatat Richie Apr 16 '16 at 18:30
  • An idea I will try (in due course): Use a SplitViewCOntroller as root. At startup dismiss the MasterView and populate details view with root view data. On tap item in table: enable the Master View and switch data feed to populate the details view with other data. All my data is in Realm Results form,. There's a post on toggling visibility of the Master View of a UiSplitViewController: http://stackoverflow.com/questions/27243158/hiding-the-master-view-controller-with-uisplitviewcontroller-in-ios8 – Ratatat Richie Apr 17 '16 at 18:43

0 Answers0