Showing posts with label Navigation Bar. Show all posts
Showing posts with label Navigation Bar. Show all posts

Thursday, October 5, 2017

UIScrollView, TableView Underlapping Navigation Bar iOS 11




Hi Friends,

               Many of us are facing issue with their iOS apps on iOS 11 like "scrollview/table view is underlapping Navigation Bar". Today I am going to provide a quick solution to make your iOS app working properly on iOS 11 if you are facing above mentioned issue.

On iOS 11 apple has added new property for scroll view i.e. contentInsetAdjustmentBehaviour.

So your app can be fixed by adding this property and set to UIScrollViewContentInsetAdjustmentBehavior.never.

or add code to your scrollview given below.
if #available(iOS 11.0, *) {
    myScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentBehavior.never

}

 Hope this will help you to fix your issue with app. And your app will work as it was working on earlier iOS version.

                                                                                      
                                                                                              Thanks.

Leave a question/ comment if needed.