Kaynağa Gözat

Minor cleanups in macros and indentation

Bharat Mediratta 8 yıl önce
ebeveyn
işleme
af57527961

+ 4 - 6
Classes/ExplorerInterface/FLEXExplorerViewController.m

@@ -173,14 +173,12 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
 
 - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
 {
-    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context)
-     {
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
          for (UIView *outlineView in [self.outlineViewsForVisibleViews allValues]) {
              outlineView.hidden = YES;
          }
          self.selectedViewOverlay.hidden = YES;
-     } completion:^(id<UIViewControllerTransitionCoordinatorContext> context)
-     {
+     } completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
          for (UIView *view in self.viewsAtTapPoint) {
              NSValue *key = [NSValue valueWithNonretainedObject:view];
              UIView *outlineView = self.outlineViewsForVisibleViews[key];
@@ -695,7 +693,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
 - (CGRect)viewSafeArea
 {
     CGRect safeArea = self.view.bounds;
-#ifdef FLEX_AT_LEAST_IOS11_SDK
+#if FLEX_AT_LEAST_IOS11_SDK
     if (@available(iOS 11, *)) {
         safeArea = UIEdgeInsetsInsetRect(self.view.bounds, self.view.safeAreaInsets);
     }
@@ -703,7 +701,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     return safeArea;
 }
 
-#ifdef FLEX_AT_LEAST_IOS11_SDK
+#if FLEX_AT_LEAST_IOS11_SDK
 - (void)viewSafeAreaInsetsDidChange
 {
   if (@available(iOS 11, *)) {

+ 1 - 1
Classes/Toolbar/FLEXExplorerToolbar.m

@@ -261,7 +261,7 @@
 - (CGRect)safeArea
 {
   CGRect safeArea = self.bounds;
-#ifdef FLEX_AT_LEAST_IOS11_SDK
+#if FLEX_AT_LEAST_IOS11_SDK
   if (@available(iOS 11, *)) {
     safeArea = UIEdgeInsetsInsetRect(self.bounds, self.safeAreaInsets);
   }

+ 2 - 0
Classes/Utility/FLEXKeyboardShortcutManager.m

@@ -165,12 +165,14 @@
                     pressureLevel++;
                 }
                 if (pressureLevel > 0) {
+#if FLEX_AT_LEAST_IOS11_SDK
                     if (@available(iOS 9.0, *)) {
                         for (UITouch *touch in [event allTouches]) {
                             double adjustedPressureLevel = pressureLevel * 20 * touch.maximumPossibleForce;
                             [touch setValue:@(adjustedPressureLevel) forKey:@"_pressure"];
                         }
                     }
+#endif
                 }
             }
             

+ 1 - 1
Classes/Utility/FLEXUtility.h

@@ -15,7 +15,7 @@
 #define FLEXFloor(x) (floor([[UIScreen mainScreen] scale] * (x)) / [[UIScreen mainScreen] scale])
 
 #if defined(__IPHONE_11_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0)
-#define FLEX_AT_LEAST_IOS11_SDK
+#define FLEX_AT_LEAST_IOS11_SDK NO
 #endif
 
 @interface FLEXUtility : NSObject