Fixed build eats

Reviewed By: skotchvail

Differential Revision: D8529938

fbshipit-source-id: 6a97d2c54757d7e75fe8731efe24704cf7fdf87c
This commit is contained in:
Hoa Dinh 2018-06-20 09:50:29 -07:00 committed by Facebook Github Bot
parent 746b503024
commit adb6929b36
1 changed files with 5 additions and 1 deletions

View File

@ -393,8 +393,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
// doesn't do weird things to UIScrollView insets automatically
// and keeps it as an opt-in behavior.
if ([_scrollView respondsToSelector:@selector(setContentInsetAdjustmentBehavior:)]) {
if (@available(iOS 11.0, *)) {
_scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
}
#endif
_automaticallyAdjustContentInsets = YES;
@ -1034,7 +1036,9 @@ RCT_SET_AND_PRESERVE_OFFSET(setScrollIndicatorInsets, scrollIndicatorInsets, UIE
// `contentInsetAdjustmentBehavior` is available since iOS 11.
if ([_scrollView respondsToSelector:@selector(setContentInsetAdjustmentBehavior:)]) {
CGPoint contentOffset = _scrollView.contentOffset;
if (@available(iOS 11.0, *)) {
_scrollView.contentInsetAdjustmentBehavior = behavior;
}
_scrollView.contentOffset = contentOffset;
}
}