Open jehartley opened 7 years ago
BOOL adjust = controller.Use UIScrollViews contentInsetAdjustmentBehavior instead;
There is not a such instruction in SW!
BOOL adjust = controller.automaticallyAdjustsScrollViewInsets;
Okay. I don't know why it was like that. However, putting what you have, Xcode nows says that is deprecated.
I found out why it said that. Xcode changed it to that because BOOL adjust = controller.automaticallyAdjustsScrollViewInsets; was deprecated. However, after Xcode changes it, then it gives the error that "Use" is problem and xcode gives the error: "Property 'Use' not found on object of type 'UIViewController *'"
Read the Xcode warning and fix it by yourself. It is a bug!
BOOL adjust = ((UIScrollView *)controller).contentInsetAdjustmentBehavior;
It will work only for iOS 11.0+, so if you want modify this and target your application for iOS 11-, you have to test the version.
iDevelepor, there is no reason to be rude.
Sorry? Xcode is rude!!!
@jehartley try like this
BOOL adjust = false;
if (@available(iOS 11.0, *)) {
adjust = ((UIScrollView *)controller).contentInsetAdjustmentBehavior;
} else {
adjust = controller.automaticallyAdjustsScrollViewInsets;
}
@kristijanexads thank you. This worked for me.
At this line: BOOL adjust = controller.Use UIScrollViews contentInsetAdjustmentBehavior instead;
"Use" is problem and xcode gives the error: "Property 'Use' not found on object of type 'UIViewController *'"
This issue didn't't exist on Xcode 8