iOS 11 update: automaticallyAdjustsScrollViewInsets
is deprecated in iOS 11.0.
Apple recommends using UIScrollView
's contentInsetAdjustmentBehavior
method instead. I set this value to .never
and the error has gone. You can also set this property in Interface Builder.