Awful / Awful.app

Something Awful Forums browser for iOS
https://forums.somethingawful.com/showthread.php?threadid=3837546&perpage=40&noseen=1
142 stars 44 forks source link

Another approach to "Hide Sidebar in Landscape" with UISplitViewController #660

Open nolanw opened 7 years ago

nolanw commented 7 years ago

We've had many split view oddities crop up over the years, including in #657: https://www.youtube.com/watch?v=zT5JhbmXqwU. Maybe there's a cleaner way.

One option: embed it in a container view controller that changes the split view controller's trait collection to horizontally regular/compact as dictated by "Hide Sidebar in Landscape". As part of that we'll probably want to forward the actually correct horizontal size class to the split view controller's child view controllers, so a bit of subclassing and coordination is required here. But in my head at least it seems feasible and may give us the functionality we crave without weird stuff happening.

Other options include removing the setting (imo we should do #232 if we go this route), or honouring the setting but requiring a restart of Awful for it to take effect (iirc it was much easier to let UISplitViewController do the thing we want if we set it up that way in the beginning and never try to change it).

(Comments below were about my original impetus for this issue, that it seemed like the "Hide Sidebar in Landscape" setting was failing completely on iPhones.)

realModusOperandi commented 7 years ago

I'm curious what you mean by "never." I hadn't noticed any issues with the setting, and I use an iPhone 7 Plus.

nolanw commented 7 years ago

iPhone X simulator.

I may have overstated things.

realModusOperandi commented 7 years ago

For some reason, the iPhone X doesn't get Plus layouts despite having the same size screen. You can't even use Springboard in landscape!

nolanw commented 7 years ago

That makes no sense whatsoever.

Guess I should rename this issue at any rate :)

nolanw commented 7 years ago

Crisis averted for now, so clearing the milestone.