-
-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for UISplitViewController #311
Conversation
Thanks for your great work. I just found a minor glitch: when a multi value specifier is updated in the detail view controller, the title in the master view controller is not updated to reflect the change. Could you fix this? Then I'm more than happy to pull! |
Nice catch! Check it out now - should work :-) |
425bf78
to
2ee9c26
Compare
Wait, I messed up this branch with a bad rebase. I'll fix it up and comment when it's ready for review properly.... |
Ok so what happened here is that I was rebased above the branch in this pull request: |
2ee9c26
to
d0b2a61
Compare
Ok so this is ready for final review. I made a few changes since your last comment:
I also tested in split view mode on the iOS 9 iPad simulator and it works like a charm! I resize the app, flip orientations and the settings updates itself as expected, changing from collapsed to split view, really nice! Let me know if there are any issues left. |
Hey there, wondering if you plan on merging this in the end? |
Absolutely, I'm just terribly busy right now.
|
Ok OK, awesome, no rush. Just hadn't heard back for a few days. |
Changed os version check Fix master view controller Added license Fixed import
Updated readme
Ping? |
Hi, just looked into your code. One thing came to my mind: Is there a compelling reason why we shouldn't remove |
Thinking twice, I think it would make even more sense to convert it to a simple property Making it a property instead of a delegate callback would also emphasize that it should only be set on the root settings VC. What do you think? |
I'll take a look and get back to you. I'll try and remember if there was a specific reason I did it differently or maybe it just evolved that way.
|
I noticed another problem with your branch. This:
causes the dynamic cell hiding animation to break / look ugly on iPhone. |
Ok there are actually a few problems that I've noticed so I'm going to rethink this. I'm closing the pull request for now. |
This pull request adds support for UISplitViewController on all devices, OS versions & orientations. It supports size classes directly so that on an iPad the settings are displayed with a split view, on iPhone as a standard tableview (collapsed split view) and on the iPhone 6+ as a tableview in portrait (compact) and split in landscape (large).
The behavior of UISplitViewController was changed in iOS 8 as it was made available on the iPhone. Therefore, wiring it up correctly to support all configurations is tricky. For this reason I added an IASKAppSettingsSplitViewController and updated the sample app to use it where relevant. For this reason I removed the settings tab from the storyboard and added it in code so that we use the correct view controller depending on the device & os version we're running on. This is intentionally in a separate commit so that we can revert it if you'd like to keep the storyboard example but in that case it won't support split view (as before).
There are some limitations:
I've added documentation where relevant & updated the readme.
Tested on all of the following configurations in the simulator:
I don't have all of the above configurations so I tested on a selection of physical devices.
I believe this fix should also support the new split view (side by side apps) on iPads running iOS 9 but I haven't verified this because InAppSettingsKit doesn't compile under Xcode 7. I plan to submit a separate pull request for that after which this can be tested.