herzbube / littlego

Little Go. An iOS application that lets you play the game of Go on the iPhone or iPad.
https://littlego.herzbube.ch/
Apache License 2.0
140 stars 54 forks source link

Review implementation of PlayRootViewControllerPhone #303

Closed herzbube closed 3 years ago

herzbube commented 8 years ago

Review the overly complicated implementation of PlayRootViewControllerPhone.

The viewWillTransitionToSize:withTransitionCoordinator:() override has the documentation with a complicated explanation why the class currently works as it does. Apparently the current implementation is as complicated as it is because I had to work around various iOS "problems", with an Auto Layout issue at the core.

While testing in the iOS 9.3 simulator for the 1.3.0 release, I found out that the viewWillTransitionToSize... override now is invoked even if the VC view is not loaded yet - this is contrary to some of the documentation and comments in PlayRootViewControllerPhone, so something must have changed since I wrote the original implementation of the VC.

If something has changed, it might have changed for the better, so some of the workarounds which make the VC implementation so complicated might no longer be necessary. Also don't forget to checkout if the core Auto Layout issue is now gone, or can be worked around using the new Auto Layout feature called "layout guides".

herzbube commented 3 years ago

There's now issue #348 requesting a redesign of the view/view controller hierarchy for UITypePhone. This issue can therefore be close now.