Tanner Bennett пре 6 година
родитељ
комит
f582c9ae0d

+ 1 - 1
Classes/ExplorerInterface/FLEXExplorerViewController.m

@@ -589,7 +589,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     // Select in the window that would handle the touch, but don't just use the result of hitTest:withEvent: so we can still select views with interaction disabled.
     // Default to the the application's key window if none of the windows want the touch.
     UIWindow *windowForSelection = [UIApplication.sharedApplication keyWindow];
-    for (UIWindow *window in [[FLEXUtility allWindows] reverseObjectEnumerator]) {
+    for (UIWindow *window in [FLEXUtility allWindows].reverseObjectEnumerator) {
         // Ignore the explorer's own window.
         if (window != self.view.window) {
             if ([window hitTest:tapPointInWindow withEvent:nil]) {

+ 1 - 1
Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableContentViewController.m

@@ -151,7 +151,7 @@
         return result;
     }];
     if (sortType == FLEXTableColumnHeaderSortTypeDesc) {
-        NSEnumerator *contentReverseEnumerator = [sortContentData reverseObjectEnumerator];
+        NSEnumerator *contentReverseEnumerator = sortContentData.reverseObjectEnumerator;
         sortContentData = [NSArray arrayWithArray:contentReverseEnumerator.allObjects];
     }
     

+ 1 - 1
Classes/ObjectExplorers/Controllers/FLEXDefaultsExplorerViewController.m

@@ -48,7 +48,7 @@
     
     if (onlyShowKeysForAppPrefs) {
         // Read keys from preferences file
-        NSString *bundle = [NSBundle mainBundle].bundleIdentifier;
+        NSString *bundle = NSBundle.mainBundle.bundleIdentifier;
         NSString *prefsPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Preferences"];
         NSString *filePath = [NSString stringWithFormat:@"%@/%@.plist", prefsPath, bundle];
         self.keys = [NSDictionary dictionaryWithContentsOfFile:filePath].allKeys;

+ 0 - 30
Classes/ObjectExplorers/Controllers/FLEXObjectExplorerViewController.m

@@ -254,16 +254,6 @@ typedef NS_ENUM(NSUInteger, FLEXMetadataKind) {
     return boxedProperties;
 }
 
-/// Skips NSObject
-+ (NSArray<FLEXPropertyBox *> *)inheritedPropertiesForClass:(Class)class
-{
-    NSMutableArray<FLEXPropertyBox *> *inheritedProperties = [NSMutableArray array];
-    while ((class = [class superclass]) && class != [NSObject class]) {
-        [inheritedProperties addObjectsFromArray:[self propertiesForClass:class]];
-    }
-    return inheritedProperties;
-}
-
 - (void)updateFilteredProperties
 {
     NSArray<FLEXPropertyBox *> *candidateProperties = [self metadata:FLEXMetadataKindProperties forClassAtIndex:self.selectedScope];
@@ -330,16 +320,6 @@ typedef NS_ENUM(NSUInteger, FLEXMetadataKind) {
     return boxedIvars;
 }
 
-/// Skips NSObject
-+ (NSArray<FLEXIvarBox *> *)inheritedIvarsForClass:(Class)class
-{
-    NSMutableArray<FLEXIvarBox *> *inheritedIvars = [NSMutableArray array];
-    while ((class = [class superclass]) && class != [NSObject class]) {
-        [inheritedIvars addObjectsFromArray:[self ivarsForClass:class]];
-    }
-    return inheritedIvars;
-}
-
 - (void)updateFilteredIvars
 {
     NSArray<FLEXIvarBox *> *candidateIvars = [self metadata:FLEXMetadataKindIvars forClassAtIndex:self.selectedScope];
@@ -418,16 +398,6 @@ typedef NS_ENUM(NSUInteger, FLEXMetadataKind) {
     return boxedMethods;
 }
 
-/// Skips NSObject
-+ (NSArray<FLEXMethodBox *> *)inheritedMethodsForClass:(Class)class
-{
-    NSMutableArray<FLEXMethodBox *> *inheritedMethods = [NSMutableArray array];
-    while ((class = [class superclass]) && class != [NSObject class]) {
-        [inheritedMethods addObjectsFromArray:[self methodsForClass:class]];
-    }
-    return inheritedMethods;
-}
-
 - (NSArray<FLEXMethodBox *> *)filteredMethodsFromMethods:(NSArray<FLEXMethodBox *> *)methods areClassMethods:(BOOL)areClassMethods
 {
     NSArray<FLEXMethodBox *> *candidateMethods = methods;

+ 1 - 1
Classes/ObjectExplorers/FLEXObjectExplorerFactory.m

@@ -106,7 +106,7 @@
         case FLEXGlobalsRowUserDefaults:
             return [self explorerViewControllerForObject:[NSUserDefaults standardUserDefaults]];
         case FLEXGlobalsRowMainBundle:
-            return [self explorerViewControllerForObject:[NSBundle mainBundle]];
+            return [self explorerViewControllerForObject:NSBundle.mainBundle];
         case FLEXGlobalsRowApplication:
             return [self explorerViewControllerForObject:UIApplication.sharedApplication];
         case FLEXGlobalsRowMainScreen:

+ 3 - 3
Classes/Utility/FLEXUtility.m

@@ -121,7 +121,7 @@
 
 + (NSString *)applicationImageName
 {
-    return [NSBundle mainBundle].executablePath;
+    return NSBundle.mainBundle.executablePath;
 }
 
 + (NSString *)applicationName
@@ -193,7 +193,7 @@
     NSMutableString *mutableString = [originalString mutableCopy];
     
     NSArray<NSTextCheckingResult *> *matches = [regex matchesInString:mutableString options:0 range:NSMakeRange(0, mutableString.length)];
-    for (NSTextCheckingResult *result in [matches reverseObjectEnumerator]) {
+    for (NSTextCheckingResult *result in matches.reverseObjectEnumerator) {
         NSString *foundString = [mutableString substringWithRange:result.range];
         NSString *replacementString = escapingDictionary[foundString];
         if (replacementString) {
@@ -206,7 +206,7 @@
 
 + (UIInterfaceOrientationMask)infoPlistSupportedInterfaceOrientationsMask
 {
-    NSArray<NSString *> *supportedOrientations = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"];
+    NSArray<NSString *> *supportedOrientations = NSBundle.mainBundle.infoDictionary[@"UISupportedInterfaceOrientations"];
     UIInterfaceOrientationMask supportedOrientationsMask = 0;
     if ([supportedOrientations containsObject:@"UIInterfaceOrientationPortrait"]) {
         supportedOrientationsMask |= UIInterfaceOrientationMaskPortrait;

+ 1 - 1
Classes/ViewHierarchy/FLEXImagePreviewViewController.m

@@ -89,7 +89,7 @@
             return;
         }
         
-        NSBundle *mainBundle = [NSBundle mainBundle];
+        NSBundle *mainBundle = NSBundle.mainBundle;
         if ([mainBundle.infoDictionary.allKeys containsObject:@"NSPhotoLibraryUsageDescription"]) {
             canSaveToCameraRoll = YES;
         }