瀏覽代碼

Safe layout guides should use a min version required not a max

Robert Payne 8 年之前
父節點
當前提交
9e9017cf3a
共有 3 個文件被更改,包括 13 次插入13 次删除
  1. 6 6
      Masonry/View+MASAdditions.h
  2. 1 1
      Masonry/View+MASAdditions.m
  3. 6 6
      Masonry/View+MASShorthandAdditions.h

+ 6 - 6
Masonry/View+MASAdditions.h

@@ -52,13 +52,13 @@
 
 #endif
 
-#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (__TV_OS_VERSION_MIN_REQUIRED >= 110000)
 
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft;
+@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight;
 
 #endif
 

+ 1 - 1
Masonry/View+MASAdditions.m

@@ -134,7 +134,7 @@
 
 #endif
 
-#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (__TV_OS_VERSION_MIN_REQUIRED >= 110000)
 
 - (MASViewAttribute *)mas_safeAreaLayoutGuide {
     return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom];

+ 6 - 6
Masonry/View+MASShorthandAdditions.h

@@ -49,12 +49,12 @@
 
 #endif
 
-#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (__TV_OS_VERSION_MIN_REQUIRED >= 110000)
 
-@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0));
-@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0));
+@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop;
+@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom;
+@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft;
+@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight;
 
 #endif
 
@@ -103,7 +103,7 @@ MAS_ATTR_FORWARD(centerYWithinMargins);
 
 #endif
 
-#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000)
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (__TV_OS_VERSION_MIN_REQUIRED >= 110000)
 
 MAS_ATTR_FORWARD(safeAreaLayoutGuideTop);
 MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom);