Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 213 Vote(s) - 3.45 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'automaticallyAdjustsScrollViewInsets' was deprecated in iOS 11.0

#1
I just started compiling up to iOS 11 and noticed that Apple now declared the property

var automaticallyAdjustsScrollViewInsets: Bool { get set }

as being deprecated:

[To see links please register here]


[![enter image description here][1]][1]

Is there another property to fix this warning in iOS 11?

Will the default value stay true or how will this be handled in future?


[1]:
Reply

#2
For those who are wanting to adjust this from an objective-c perspective, here is the code:

self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever
Reply

#3
You can also set this in Interface Builder. Select your tableView or collectionView then select from the drop-down in the Size Inspector select .never for 'Content Insets Adjustment Behavior'

[![Size Inspector][1]][1]


[1]:
Reply

#4
This code may help:

if #available(iOS 11.0, *) {
scrollView.contentInsetAdjustmentBehavior = .never
} else {
automaticallyAdjustsScrollViewInsets = false
}

Reply

#5
The default for this property is now true. If you need to set this, you will need to set it in the scrollview that would host the viewController and set its property contentInsetAdjustmentBehavior. Below is an example:

scrollView.contentInsetAdjustmentBehavior = .automatic

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through