Feature Request: override layoutGuides

Originator:futuretap
Number:rdar://21123507 Date Originated:27-May-2015 07:08 PM
Status:Open Resolved:
Product:iOS SDK Product Version:8.3
Classification:Enhancement Reproducible:Not Applicable
 
topLayoutGuide and bottomLayoutGuide are great to layout content with translucent bars. However, they can't be changed right now.

For instance, I'm subclassing UITabViewController to dynamically insert a translucent banner view on top of the tab bar. To make sure that all content view controllers (UITableViewControllers and UIViewControllers wit custom views) use the correct insets I'm currently left with two choices:

- set automaticallyAdjustsScrollViewInsets to NO: this works but I have to configure all insets manually. Also, when using UISearchController with its search bar embedded into a table view, I don't get the nice animation when activating search mode.

- fight the framework to manually override bottom insets of content views such as table views. This is a huge pain because the content inset must be set prior to pushing a new view controller otherwise UIKit effectively doubles the bottom inset.

I also tried various crazy hacks such as replacing or changing the UILayoutSupportConstraint created by the system. There's even a Cocoa Pod for that: https://github.com/stefreak/TTLayoutSupport - However, this doesn't help to configure tableView insets. The system still uses its standard layout guides for that.

It would be so much easier if I could easily specify a custom bottomLayoutGuide myself. This could be done by making topLayoutGuide and bottomLayoutGuide readwrite properties.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!