Просмотр исходного кода

Fix mixing of UIInterfaceOrientation enum with UIInterfaceOrientationMask enum.

Ryan Olson лет назад: 12
Родитель
Сommit
f898ef2bdf
2 измененных файлов с 5 добавлено и 5 удалено
  1. 1 1
      Classes/Utility/FLEXUtility.h
  2. 4 4
      Classes/Utility/FLEXUtility.m

+ 1 - 1
Classes/Utility/FLEXUtility.h

@@ -25,7 +25,7 @@
 + (UIFont *)defaultFontOfSize:(CGFloat)size;
 + (UIFont *)defaultFontOfSize:(CGFloat)size;
 + (UIFont *)defaultTableViewCellLabelFont;
 + (UIFont *)defaultTableViewCellLabelFont;
 + (NSString *)stringByEscapingHTMLEntitiesInString:(NSString *)originalString;
 + (NSString *)stringByEscapingHTMLEntitiesInString:(NSString *)originalString;
-+ (NSUInteger)infoPlistSupportedInterfaceOrientationsMask;
++ (UIInterfaceOrientationMask)infoPlistSupportedInterfaceOrientationsMask;
 + (NSString *)searchBarPlaceholderText;
 + (NSString *)searchBarPlaceholderText;
 + (BOOL)isImagePathExtension:(NSString *)extension;
 + (BOOL)isImagePathExtension:(NSString *)extension;
 
 

+ 4 - 4
Classes/Utility/FLEXUtility.m

@@ -153,12 +153,12 @@
     return [mutableString copy];
     return [mutableString copy];
 }
 }
 
 
-+ (NSUInteger)infoPlistSupportedInterfaceOrientationsMask
++ (UIInterfaceOrientationMask)infoPlistSupportedInterfaceOrientationsMask
 {
 {
     NSArray *supportedOrientations = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"];
     NSArray *supportedOrientations = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"];
-    NSUInteger supportedOrientationsMask = 0;
+    UIInterfaceOrientationMask supportedOrientationsMask = 0;
     if ([supportedOrientations containsObject:@"UIInterfaceOrientationPortrait"]) {
     if ([supportedOrientations containsObject:@"UIInterfaceOrientationPortrait"]) {
-        supportedOrientationsMask |= UIInterfaceOrientationPortrait;
+        supportedOrientationsMask |= UIInterfaceOrientationMaskPortrait;
     }
     }
     if ([supportedOrientations containsObject:@"UIInterfaceOrientationMaskLandscapeRight"]) {
     if ([supportedOrientations containsObject:@"UIInterfaceOrientationMaskLandscapeRight"]) {
         supportedOrientationsMask |= UIInterfaceOrientationMaskLandscapeRight;
         supportedOrientationsMask |= UIInterfaceOrientationMaskLandscapeRight;
@@ -167,7 +167,7 @@
         supportedOrientationsMask |= UIInterfaceOrientationMaskPortraitUpsideDown;
         supportedOrientationsMask |= UIInterfaceOrientationMaskPortraitUpsideDown;
     }
     }
     if ([supportedOrientations containsObject:@"UIInterfaceOrientationLandscapeLeft"]) {
     if ([supportedOrientations containsObject:@"UIInterfaceOrientationLandscapeLeft"]) {
-        supportedOrientationsMask |= UIInterfaceOrientationLandscapeLeft;
+        supportedOrientationsMask |= UIInterfaceOrientationMaskLandscapeLeft;
     }
     }
     return supportedOrientationsMask;
     return supportedOrientationsMask;
 }
 }