1

I have started to migrate from an iPhone app to an iPad app and I have hit the problem of how to include a UISplitViewController. My master / detail is not the root of the application, instead I have login pages and camera views etc before you get to the master / detail stuff so I have been trying to find a way of using the split view controller without setting it as the root. I have managed to achieve this but I have created the mother of all memory leaks doing this so I have decided to recode the application (thanks apple) so that I can use the UISplitViewController is the root controller.

Before I start this process I decided to look into all of the other things I need to do as part of the migration from iPhone to iPad and I have come across another problem I cannot work out the solution to.

I have multiple pairs of master / detail views which the iPhone deals with okay. In the iPad this means I need multiple UISplitViews. How is this done? I have seen many threads on using one split view controller with one master view and multiple detail views, but not one on multiple master views each paired with one detail view.

to clarify that is multiple master views each with their own detail view, not multiple master views sharing one detail view.

e.g.

Master1 - Detail 1 Master2 - Detail 2 Master3 - Detail 3

How would you do this with only one UISplitViewController?

Can anyone offer me some guidance on this please?

1 Answer 1

1

Since the split view controller should only be concerned with screen layout and not content, switching its child view controllers shouldn't be a big problem.

If, for some reason, it's easier to design in terms of multiple split view controllers, consider that the thing you assign as the root view controller doesn't have to remain root for the entire execution of the app.

Sign up to request clarification or add additional context in comments.

2 Comments

Phil, If the root view controller does not have to remain the root for the entire execution of the app then it would be easier to change the root view controller from the default one I have now to the UISplitViewController. However, when this is done there are a few memory leaks that do not get cleaned up. My question would be, if you can change the root view controller, how do you do this without creating leaks?
I don't have any universal advice on that. If you have code that leaks, you might post it in a question to see if someone can advise on better memory management for the specific case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.