Sfoglia il codice sorgente

Fix mixing of UIInterfaceOrientation enum with UIInterfaceOrientationMask enum.

Ryan Olson 12 anni fa
parent
commit
f898ef2bdf
2 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  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 *)defaultTableViewCellLabelFont;
 + (NSString *)stringByEscapingHTMLEntitiesInString:(NSString *)originalString;
-+ (NSUInteger)infoPlistSupportedInterfaceOrientationsMask;
++ (UIInterfaceOrientationMask)infoPlistSupportedInterfaceOrientationsMask;
 + (NSString *)searchBarPlaceholderText;
 + (BOOL)isImagePathExtension:(NSString *)extension;
 

+ 4 - 4
Classes/Utility/FLEXUtility.m

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