mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Fixed build on Xcode 10.2 - availability guard
Summary: https://our.intern.facebook.com/intern/sandcastle/job/18014398585083744 ``` xplat/js/react-native-github/React/Views/ScrollView/RCTScrollViewManager.m:38:20: warning: 'UIScrollViewContentInsetAdjustmentBehavior' is only available on iOS 11.0 or newer [-Wunguarded-availability-new] ``` Reviewed By: mattrobmattrob Differential Revision: D14076127 fbshipit-source-id: 4050131c4f5211757383069567a2cf5382979735
This commit is contained in:
committed by
Facebook Github Bot
parent
cf5f25472d
commit
b655e7555b
@@ -34,6 +34,8 @@ RCT_ENUM_CONVERTER(UIScrollViewIndicatorStyle, (@{
|
||||
@"white": @(UIScrollViewIndicatorStyleWhite),
|
||||
}), UIScrollViewIndicatorStyleDefault, integerValue)
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
|
||||
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
|
||||
RCT_ENUM_CONVERTER(UIScrollViewContentInsetAdjustmentBehavior, (@{
|
||||
@"automatic": @(UIScrollViewContentInsetAdjustmentAutomatic),
|
||||
@@ -42,6 +44,7 @@ RCT_ENUM_CONVERTER(UIScrollViewContentInsetAdjustmentBehavior, (@{
|
||||
@"always": @(UIScrollViewContentInsetAdjustmentAlways),
|
||||
}), UIScrollViewContentInsetAdjustmentNever, integerValue)
|
||||
#endif
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user