4
votes

I have a UISplitViewController in a separate storyboard. I'm iPhone only now, iOS 8+, and did it this way so it'll work when I build my iPad version.

From my main storyboard and plain UINavigationController/UIViewController, I present the splitViewController modally. When I dismiss, neither my split, primary, or secondary viewControllers are released (no console logs from dealloc).

According to the View Controller Catalog, as of 2014-11-15:

Split view controllers cannot be presented modally.

But the actual UISplitViewController documentation, as of 2015-06-08, makes no mention of this limitation.

Xcode doesn't give me any warnings about presenting a UISplitViewController. So, assuming this is an acceptable use case, how do I go about ensuring everything is destroyed properly when it gets dismissed?

1

1 Answers

0
votes

Recently I came across exactly the same issue - UISplitViewController never get deallocated if dismissed after presented modally.

So, finally I decided to use MGSplitViewController, namely this updated to iOS 8 branch - https://github.com/asprega/MGSplitViewController

It works the same way as UISplitViewController, but more flexible and can be presented modally without any memory leaks! (btw, it has few glitches, but not so important in my case...)