I have to share my experience. I had this piece of code that worked great with iOS 10 and iOS 11 headerView?.contentView.backgroundColor = .lightGray
Then I suddenly decided to deploy the application for iOS 9, as there are some devices (iPad mini, some older generation does not update any OS for 9). The only solution that worked for all iOS 9, 10, and 11 was to determine the base type of the header, which then contains all the other headings, plug it from the storyboard, and set the backgroundColor this base view.
You want to be careful when connecting the outlet, so as not to call it: backgroundView , since some superclass already has a property with this name. I called my containingView
Also, when connecting an output controller, click on the view in the Document Outline to make sure that it is not connected to the file owner
Ahmed Khedr Nov 03 '17 at 9:30 2017-11-03 09:30
source share