浏览代码

Use properties where applicable

Tanner Bennett 6 年之前
父节点
当前提交
f2f66489d1
共有 40 个文件被更改,包括 138 次插入138 次删除
  1. 1 1
      Classes/Core/Views/Carousel/FLEXCarouselCell.m
  2. 2 2
      Classes/Core/Views/Carousel/FLEXScopeCarousel.m
  3. 1 1
      Classes/Core/Views/Cells/FLEXTableViewCell.m
  4. 1 1
      Classes/Editing/ArgumentInputViews/FLEXArgumentInputColorView.m
  5. 1 1
      Classes/Editing/ArgumentInputViews/FLEXArgumentInputFontsPickerView.m
  6. 3 3
      Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.m
  7. 1 1
      Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.m
  8. 1 1
      Classes/Editing/FLEXFieldEditorViewController.m
  9. 2 2
      Classes/ExplorerInterface/FLEXExplorerViewController.m
  10. 4 4
      Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableListViewController.m
  11. 3 3
      Classes/GlobalStateExplorers/Keychain/FLEXKeychainQuery.m
  12. 2 2
      Classes/GlobalStateExplorers/Keychain/FLEXKeychainTableViewController.m
  13. 1 1
      Classes/GlobalStateExplorers/RuntimeBrowser/DataSources/FLEXRuntimeClient.h
  14. 10 10
      Classes/GlobalStateExplorers/RuntimeBrowser/DataSources/FLEXRuntimeController.m
  15. 1 1
      Classes/GlobalStateExplorers/RuntimeBrowser/FLEXKeyPathSearchController.m
  16. 1 1
      Classes/GlobalStateExplorers/RuntimeBrowser/FLEXRuntimeKeyPath.m
  17. 2 2
      Classes/GlobalStateExplorers/RuntimeBrowser/FLEXRuntimeKeyPathTokenizer.m
  18. 5 5
      Classes/Manager/FLEXManager+Extensibility.m
  19. 3 3
      Classes/Network/FLEXNetworkMITMViewController.m
  20. 2 2
      Classes/Network/FLEXNetworkRecorder.m
  21. 4 4
      Classes/Network/FLEXNetworkSettingsTableViewController.m
  22. 4 4
      Classes/Network/FLEXNetworkTransactionDetailTableViewController.m
  23. 1 1
      Classes/Network/FLEXNetworkTransactionTableViewCell.m
  24. 50 50
      Classes/Network/PonyDebugger/FLEXNetworkObserver.m
  25. 1 1
      Classes/ObjectExplorers/Sections/FLEXDefaultsContentSection.m
  26. 1 1
      Classes/Toolbar/FLEXExplorerToolbar.m
  27. 2 2
      Classes/Toolbar/FLEXToolbarItem.m
  28. 1 1
      Classes/Utility/Categories/NSDictionary+ObjcRuntime.m
  29. 2 2
      Classes/Utility/Categories/NSObject+Reflection.m
  30. 3 3
      Classes/Utility/FLEXUtility.m
  31. 1 1
      Classes/Utility/Keyboard/FLEXKeyboardHelpViewController.m
  32. 3 3
      Classes/Utility/Keyboard/FLEXKeyboardShortcutManager.m
  33. 1 1
      Classes/Utility/Runtime/FLEXRuntimeUtility.m
  34. 1 1
      Classes/ViewHierarchy/FLEXHierarchyViewController.m
  35. 1 1
      Classes/ViewHierarchy/FLEXImagePreviewViewController.m
  36. 4 4
      Classes/ViewHierarchy/SnapshotExplorer/FHSRangeSlider.m
  37. 1 1
      Classes/ViewHierarchy/SnapshotExplorer/FHSSnapshotView.m
  38. 1 1
      Classes/ViewHierarchy/SnapshotExplorer/FHSView.m
  39. 3 3
      Classes/ViewHierarchy/TreeExplorer/FLEXHierarchyTableViewCell.m
  40. 6 6
      FLEXTests/FLEXTests.m

+ 1 - 1
Classes/Core/Views/Carousel/FLEXCarouselCell.m

@@ -47,7 +47,7 @@
     if (self.selected) {
         self.titleLabel.textColor = self.tintColor;
     } else {
-        self.titleLabel.textColor = [FLEXColor deemphasizedTextColor];
+        self.titleLabel.textColor = FLEXColor.deemphasizedTextColor;
     }
 }
 

+ 2 - 2
Classes/Core/Views/Carousel/FLEXScopeCarousel.m

@@ -29,7 +29,7 @@ NSString * const kCarouselCellReuseIdentifier = @"kCarouselCellReuseIdentifier";
 - (id)initWithFrame:(CGRect)frame {
     self = [super initWithFrame:frame];
     if (self) {
-        self.backgroundColor = [FLEXColor primaryBackgroundColor];
+        self.backgroundColor = FLEXColor.primaryBackgroundColor;
         self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
         self.translatesAutoresizingMaskIntoConstraints = YES;
         _dynamicTypeHandlers = [NSMutableArray new];
@@ -104,7 +104,7 @@ NSString * const kCarouselCellReuseIdentifier = @"kCarouselCellReuseIdentifier";
 
     // Draw hairline
     CGContextRef context = UIGraphicsGetCurrentContext();
-    CGContextSetStrokeColorWithColor(context, [FLEXColor hairlineColor].CGColor);
+    CGContextSetStrokeColorWithColor(context, FLEXColor.hairlineColor.CGColor);
     CGContextSetLineWidth(context, width);
     CGContextMoveToPoint(context, 0, rect.size.height - width);
     CGContextAddLineToPoint(context, rect.size.width, rect.size.height - width);

+ 1 - 1
Classes/Core/Views/Cells/FLEXTableViewCell.m

@@ -37,7 +37,7 @@
     UIFont *cellFont = UIFont.flex_defaultTableCellFont;
     self.titleLabel.font = cellFont;
     self.subtitleLabel.font = cellFont;
-    self.subtitleLabel.textColor = [FLEXColor deemphasizedTextColor];
+    self.subtitleLabel.textColor = FLEXColor.deemphasizedTextColor;
     
     self.titleLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
     self.subtitleLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;

+ 1 - 1
Classes/Editing/ArgumentInputViews/FLEXArgumentInputColorView.m

@@ -234,7 +234,7 @@
             [self updateWithColor:color];
         }
     } else {
-        [self updateWithColor:[UIColor clearColor]];
+        [self updateWithColor:UIColor.clearColor];
     }
 }
 

+ 1 - 1
Classes/Editing/ArgumentInputViews/FLEXArgumentInputFontsPickerView.m

@@ -52,7 +52,7 @@
 
 - (void)createAvailableFonts {
     NSMutableArray<NSString *> *unsortedFontsArray = [NSMutableArray new];
-    for (NSString *eachFontFamily in [UIFont familyNames]) {
+    for (NSString *eachFontFamily in UIFont.familyNames) {
         for (NSString *eachFontName in [UIFont fontNamesForFamilyName:eachFontFamily]) {
             [unsortedFontsArray addObject:eachFontName];
         }

+ 3 - 3
Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.m

@@ -25,7 +25,7 @@
     if (self) {
         self.inputTextView = [UITextView new];
         self.inputTextView.font = [[self class] inputFont];
-        self.inputTextView.backgroundColor = [FLEXColor secondaryGroupedBackgroundColor];
+        self.inputTextView.backgroundColor = FLEXColor.secondaryGroupedBackgroundColor;
         self.inputTextView.layer.cornerRadius = 10.f;
         self.inputTextView.contentInset = UIEdgeInsetsMake(0, 5, 0, 0);
         self.inputTextView.autocapitalizationType = UITextAutocapitalizationTypeNone;
@@ -36,12 +36,12 @@
             [self.inputTextView.layer setValue:@YES forKey:@"continuousCorners"];
         } else {
             self.inputTextView.layer.borderWidth = 1.f;
-            self.inputTextView.layer.borderColor = [FLEXColor borderColor].CGColor;
+            self.inputTextView.layer.borderColor = FLEXColor.borderColor.CGColor;
         }
 
         self.placeholderLabel = [UILabel new];
         self.placeholderLabel.font = self.inputTextView.font;
-        self.placeholderLabel.textColor = [FLEXColor deemphasizedTextColor];
+        self.placeholderLabel.textColor = FLEXColor.deemphasizedTextColor;
         self.placeholderLabel.numberOfLines = 0;
 
         [self addSubview:self.inputTextView];

+ 1 - 1
Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.m

@@ -54,7 +54,7 @@
     if (!_titleLabel) {
         _titleLabel = [UILabel new];
         _titleLabel.font = [[self class] titleFont];
-        _titleLabel.textColor = [FLEXColor primaryTextColor];
+        _titleLabel.textColor = FLEXColor.primaryTextColor;
         _titleLabel.numberOfLines = 0;
         [self addSubview:_titleLabel];
     }

+ 1 - 1
Classes/Editing/FLEXFieldEditorViewController.m

@@ -53,7 +53,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
 
-    self.view.backgroundColor = [FLEXColor groupedBackgroundColor];
+    self.view.backgroundColor = FLEXColor.groupedBackgroundColor;
 
     // Create getter button
     _getterButton = [[UIBarButtonItem alloc]

+ 2 - 2
Classes/ExplorerInterface/FLEXExplorerViewController.m

@@ -153,7 +153,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
 //    }
     
     UIViewController *viewControllerToAsk = [self viewControllerForRotationAndOrientation];
-    UIInterfaceOrientationMask supportedOrientations = [FLEXUtility infoPlistSupportedInterfaceOrientationsMask];
+    UIInterfaceOrientationMask supportedOrientations = FLEXUtility.infoPlistSupportedInterfaceOrientationsMask;
     if (viewControllerToAsk && ![viewControllerToAsk isKindOfClass:[self class]]) {
         supportedOrientations = [viewControllerToAsk supportedInterfaceOrientations];
     }
@@ -661,7 +661,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
 
 - (NSArray<UIView *> *)viewsAtPoint:(CGPoint)tapPointInWindow skipHiddenViews:(BOOL)skipHidden {
     NSMutableArray<UIView *> *views = [NSMutableArray new];
-    for (UIWindow *window in [FLEXUtility allWindows]) {
+    for (UIWindow *window in FLEXUtility.allWindows) {
         // Don't include the explorer's own window or subviews.
         if (window != self.view.window && [window pointInside:tapPointInWindow withEvent:nil]) {
             [views addObject:window];

+ 4 - 4
Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableListViewController.m

@@ -113,12 +113,12 @@
 - (id<FLEXDatabaseManager>)databaseManagerForFileAtPath:(NSString *)path {
     NSString *pathExtension = path.pathExtension.lowercaseString;
     
-    NSArray<NSString *> *sqliteExtensions = [FLEXTableListViewController supportedSQLiteExtensions];
+    NSArray<NSString *> *sqliteExtensions = FLEXTableListViewController.supportedSQLiteExtensions;
     if ([sqliteExtensions indexOfObject:pathExtension] != NSNotFound) {
         return [FLEXSQLiteDatabaseManager managerForDatabase:path];
     }
     
-    NSArray<NSString *> *realmExtensions = [FLEXTableListViewController supportedRealmExtensions];
+    NSArray<NSString *> *realmExtensions = FLEXTableListViewController.supportedRealmExtensions;
     if (realmExtensions != nil && [realmExtensions indexOfObject:pathExtension] != NSNotFound) {
         return [FLEXRealmDatabaseManager managerForDatabase:path];
     }
@@ -132,12 +132,12 @@
 + (BOOL)supportsExtension:(NSString *)extension {
     extension = extension.lowercaseString;
     
-    NSArray<NSString *> *sqliteExtensions = [FLEXTableListViewController supportedSQLiteExtensions];
+    NSArray<NSString *> *sqliteExtensions = FLEXTableListViewController.supportedSQLiteExtensions;
     if (sqliteExtensions.count > 0 && [sqliteExtensions indexOfObject:extension] != NSNotFound) {
         return YES;
     }
     
-    NSArray<NSString *> *realmExtensions = [FLEXTableListViewController supportedRealmExtensions];
+    NSArray<NSString *> *realmExtensions = FLEXTableListViewController.supportedRealmExtensions;
     if (realmExtensions.count > 0 && [realmExtensions indexOfObject:extension] != NSNotFound) {
         return YES;
     }

+ 3 - 3
Classes/GlobalStateExplorers/Keychain/FLEXKeychainQuery.m

@@ -29,7 +29,7 @@
         query = [[NSMutableDictionary alloc]init];
         query[(__bridge id)kSecValueData] = self.passwordData;
 #if __IPHONE_4_0 && TARGET_OS_IPHONE
-        CFTypeRef accessibilityType = [FLEXKeychain accessibilityType];
+        CFTypeRef accessibilityType = FLEXKeychain.accessibilityType;
         if (accessibilityType) {
             query[(__bridge id)kSecAttrAccessible] = (__bridge id)accessibilityType;
         }
@@ -42,7 +42,7 @@
         }
         query[(__bridge id)kSecValueData] = self.passwordData;
 #if __IPHONE_4_0 && TARGET_OS_IPHONE
-        CFTypeRef accessibilityType = [FLEXKeychain accessibilityType];
+        CFTypeRef accessibilityType = FLEXKeychain.accessibilityType;
         if (accessibilityType) {
             query[(__bridge id)kSecAttrAccessible] = (__bridge id)accessibilityType;
         }
@@ -103,7 +103,7 @@
     query[(__bridge id)kSecReturnAttributes] = @YES;
     query[(__bridge id)kSecMatchLimit] = (__bridge id)kSecMatchLimitAll;
 #if __IPHONE_4_0 && TARGET_OS_IPHONE
-    CFTypeRef accessibilityType = [FLEXKeychain accessibilityType];
+    CFTypeRef accessibilityType = FLEXKeychain.accessibilityType;
     if (accessibilityType) {
         query[(__bridge id)kSecAttrAccessible] = (__bridge id)accessibilityType;
     }

+ 2 - 2
Classes/GlobalStateExplorers/Keychain/FLEXKeychainTableViewController.m

@@ -42,7 +42,7 @@
 }
 
 - (NSArray<FLEXTableViewSection *> *)makeSections {
-    _section = [FLEXMutableListSection list:[FLEXKeychain allAccounts].mutableCopy
+    _section = [FLEXMutableListSection list:FLEXKeychain.allAccounts.mutableCopy
         cellConfiguration:^(__kindof FLEXTableViewCell *cell, NSDictionary *item, NSInteger row) {
             cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
         
@@ -79,7 +79,7 @@
 }
 
 - (void)reloadSections {
-    self.section.list = [FLEXKeychain allAccounts].mutableCopy;
+    self.section.list = FLEXKeychain.allAccounts.mutableCopy;
 }
 
 - (void)refreshSectionTitle {

+ 1 - 1
Classes/GlobalStateExplorers/RuntimeBrowser/DataSources/FLEXRuntimeClient.h

@@ -12,7 +12,7 @@
 /// Accepts runtime queries given a token.
 @interface FLEXRuntimeClient : NSObject
 
-+ (instancetype)runtime;
+@property (nonatomic, readonly, class) FLEXRuntimeClient *runtime;
 
 /// Called automatically when \c FLEXRuntime is first used.
 /// You may call it again when you think a library has

+ 10 - 10
Classes/GlobalStateExplorers/RuntimeBrowser/DataSources/FLEXRuntimeController.m

@@ -64,7 +64,7 @@ static FLEXRuntimeController *controller = nil;
 + (NSArray<NSArray<FLEXMethod *> *> *)methodsForToken:(FLEXSearchToken *)token
                          instance:(NSNumber *)inst
                         inClasses:(NSArray<NSString*> *)classes {
-    return [[FLEXRuntimeClient runtime]
+    return [FLEXRuntimeClient.runtime
         methodsForToken:token
         instance:inst
         inClasses:classes
@@ -81,15 +81,15 @@ static FLEXRuntimeController *controller = nil;
         return @"(unspecified)";
     }
     
-    return [[FLEXRuntimeClient runtime] shortNameForImageName:@(imageName)];
+    return [FLEXRuntimeClient.runtime shortNameForImageName:@(imageName)];
 }
 
 + (NSString *)imagePathWithShortName:(NSString *)suffix {
-    return [[FLEXRuntimeClient runtime] imageNameForShortName:suffix];
+    return [FLEXRuntimeClient.runtime imageNameForShortName:suffix];
 }
 
 + (NSArray *)allBundleNames {
-    return [FLEXRuntimeClient runtime].imageDisplayNames;
+    return FLEXRuntimeClient.runtime.imageDisplayNames;
 }
 
 #pragma mark Private
@@ -104,12 +104,12 @@ static FLEXRuntimeController *controller = nil;
             return cached;
         }
 
-        NSMutableArray<NSString*> *bundles = [[FLEXRuntimeClient runtime] bundlePathsForToken:token];
+        NSMutableArray<NSString*> *bundles = [FLEXRuntimeClient.runtime bundlePathsForToken:token];
         [self.bundlePathsCache setObject:bundles forKey:token];
         return bundles;
     }
     else {
-        return [[FLEXRuntimeClient runtime] bundlePathsForToken:token];
+        return [FLEXRuntimeClient.runtime bundlePathsForToken:token];
     }
 }
 
@@ -123,12 +123,12 @@ static FLEXRuntimeController *controller = nil;
             return cached;
         }
 
-        NSMutableArray<NSString*> *bundles = [[FLEXRuntimeClient runtime] bundleNamesForToken:token];
+        NSMutableArray<NSString*> *bundles = [FLEXRuntimeClient.runtime bundleNamesForToken:token];
         [self.bundleNamesCache setObject:bundles forKey:token];
         return bundles;
     }
     else {
-        return [[FLEXRuntimeClient runtime] bundleNamesForToken:token];
+        return [FLEXRuntimeClient.runtime bundleNamesForToken:token];
     }
 }
 
@@ -149,7 +149,7 @@ static FLEXRuntimeController *controller = nil;
     }
 
     NSMutableArray *bundles = [self bundlePathsForToken:bundleToken];
-    NSMutableArray *classes = [[FLEXRuntimeClient runtime] classesForToken:classToken inBundles:bundles];
+    NSMutableArray *classes = [FLEXRuntimeClient.runtime classesForToken:classToken inBundles:bundles];
 
     if (shouldCache) {
         [self.classNamesCache setObject:classes forKey:key];
@@ -166,7 +166,7 @@ static FLEXRuntimeController *controller = nil;
     }
 
     NSArray<NSString *> *classes = [self classesForKeyPath:keyPath];
-    NSArray<NSMutableArray<FLEXMethod *> *> *methodLists = [[FLEXRuntimeClient runtime]
+    NSArray<NSMutableArray<FLEXMethod *> *> *methodLists = [FLEXRuntimeClient.runtime
         methodsForToken:keyPath.methodKey
         instance:keyPath.instanceMethods
         inClasses:classes

+ 1 - 1
Classes/GlobalStateExplorers/RuntimeBrowser/FLEXKeyPathSearchController.m

@@ -277,7 +277,7 @@
 }
 
 - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
-    self.keyPath = [FLEXRuntimeKeyPath empty];
+    self.keyPath = FLEXRuntimeKeyPath.empty;
     [self updateTable];
 }
 

+ 1 - 1
Classes/GlobalStateExplorers/RuntimeBrowser/FLEXRuntimeKeyPath.m

@@ -19,7 +19,7 @@
     static FLEXRuntimeKeyPath *empty = nil;
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
-        FLEXSearchToken *any = [FLEXSearchToken any];
+        FLEXSearchToken *any = FLEXSearchToken.any;
 
         empty = [self new];
         empty->_bundleKey = any;

+ 2 - 2
Classes/GlobalStateExplorers/RuntimeBrowser/FLEXRuntimeKeyPathTokenizer.m

@@ -101,7 +101,7 @@ static NSCharacterSet *methodAllowed     = nil;
         return [FLEXSearchToken string:nil options:TBWildcardOptionsAny];
     } else if ([scanner scanString:@"*" intoString:nil]) {
         if (scanner.isAtEnd) {
-            return [FLEXSearchToken any];
+            return FLEXSearchToken.any;
         }
         
         options |= TBWildcardOptionsPrefix;
@@ -122,7 +122,7 @@ static NSCharacterSet *methodAllowed     = nil;
                     [token appendString:@"."];
                 } else if (scanner.isAtEnd && options == TBWildcardOptionsPrefix) {
                     // Only allow standalone '\' if prefixed by '*'
-                    return [FLEXSearchToken any];
+                    return FLEXSearchToken.any;
                 } else {
                     // Token starts with a number, period, or something else not allowed,
                     // or token is a standalone '\' with no '*' prefix

+ 5 - 5
Classes/Manager/FLEXManager+Extensibility.m

@@ -28,7 +28,7 @@
 - (void)registerGlobalEntryWithName:(NSString *)entryName objectFutureBlock:(id (^)(void))objectFutureBlock {
     NSParameterAssert(entryName);
     NSParameterAssert(objectFutureBlock);
-    NSAssert([NSThread isMainThread], @"This method must be called from the main thread.");
+    NSAssert(NSThread.isMainThread, @"This method must be called from the main thread.");
 
     entryName = entryName.copy;
     FLEXGlobalsEntry *entry = [FLEXGlobalsEntry entryWithNameFuture:^NSString *{
@@ -43,7 +43,7 @@
 - (void)registerGlobalEntryWithName:(NSString *)entryName viewControllerFutureBlock:(UIViewController * (^)(void))viewControllerFutureBlock {
     NSParameterAssert(entryName);
     NSParameterAssert(viewControllerFutureBlock);
-    NSAssert([NSThread isMainThread], @"This method must be called from the main thread.");
+    NSAssert(NSThread.isMainThread, @"This method must be called from the main thread.");
 
     entryName = entryName.copy;
     FLEXGlobalsEntry *entry = [FLEXGlobalsEntry entryWithNameFuture:^NSString *{
@@ -62,19 +62,19 @@
 
 - (void)registerSimulatorShortcutWithKey:(NSString *)key modifiers:(UIKeyModifierFlags)modifiers action:(dispatch_block_t)action description:(NSString *)description {
 #if TARGET_OS_SIMULATOR
-    [[FLEXKeyboardShortcutManager sharedManager] registerSimulatorShortcutWithKey:key modifiers:modifiers action:action description:description];
+    [FLEXKeyboardShortcutManager.sharedManager registerSimulatorShortcutWithKey:key modifiers:modifiers action:action description:description];
 #endif
 }
 
 - (void)setSimulatorShortcutsEnabled:(BOOL)simulatorShortcutsEnabled {
 #if TARGET_OS_SIMULATOR
-    [[FLEXKeyboardShortcutManager sharedManager] setEnabled:simulatorShortcutsEnabled];
+    [FLEXKeyboardShortcutManager.sharedManager setEnabled:simulatorShortcutsEnabled];
 #endif
 }
 
 - (BOOL)simulatorShortcutsEnabled {
 #if TARGET_OS_SIMULATOR
-    return [[FLEXKeyboardShortcutManager sharedManager] isEnabled];
+    return FLEXKeyboardShortcutManager.sharedManager.isEnabled;
 #else
     return NO;
 #endif

+ 3 - 3
Classes/Network/FLEXNetworkMITMViewController.m

@@ -58,7 +58,7 @@
         forCellReuseIdentifier:kFLEXNetworkTransactionCellIdentifier
     ];
     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
-    self.tableView.rowHeight = [FLEXNetworkTransactionTableViewCell preferredCellHeight];
+    self.tableView.rowHeight = FLEXNetworkTransactionTableViewCell.preferredCellHeight;
 
     [self registerForNotifications];
     [self updateTransactions];
@@ -337,9 +337,9 @@
     // Since we insert from the top, assign background colors bottom up to keep them consistent for each transaction.
     NSInteger totalRows = [tableView numberOfRowsInSection:indexPath.section];
     if ((totalRows - indexPath.row) % 2 == 0) {
-        cell.backgroundColor = [FLEXColor secondaryBackgroundColor];
+        cell.backgroundColor = FLEXColor.secondaryBackgroundColor;
     } else {
-        cell.backgroundColor = [FLEXColor primaryBackgroundColor];
+        cell.backgroundColor = FLEXColor.primaryBackgroundColor;
     }
 
     return cell;

+ 2 - 2
Classes/Network/FLEXNetworkRecorder.m

@@ -109,7 +109,7 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
     }
     
     // Before async block to stay accurate
-    NSDate *startDate = NSDate.date;
+    NSDate *startDate = [NSDate date];
 
     if (redirectResponse) {
         [self recordResponseReceivedWithRequestID:requestID response:redirectResponse];
@@ -132,7 +132,7 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
 
 - (void)recordResponseReceivedWithRequestID:(NSString *)requestID response:(NSURLResponse *)response {
     // Before async block to stay accurate
-    NSDate *responseDate = NSDate.date;
+    NSDate *responseDate = [NSDate date];
 
     dispatch_async(self.queue, ^{
         FLEXNetworkTransaction *transaction = self.networkTransactionsForRequestIdentifiers[requestID];

+ 4 - 4
Classes/Network/FLEXNetworkSettingsTableViewController.m

@@ -40,7 +40,7 @@
     UITableViewCell *cacheMediaResponsesCell = [self switchCellWithTitle:@"Cache Media Responses" toggleAction:@selector(cacheMediaResponsesToggled:) isOn:NO];
     [mutableCells addObject:cacheMediaResponsesCell];
 
-    NSUInteger currentCacheLimit = [[FLEXNetworkRecorder defaultRecorder] responseCacheByteLimit];
+    NSUInteger currentCacheLimit = [FLEXNetworkRecorder.defaultRecorder responseCacheByteLimit];
     const NSUInteger fiftyMega = 50 * 1024 * 1024;
     NSString *cacheLimitTitle = [self titleForCacheLimitCellWithValue:currentCacheLimit];
     self.cacheLimitCell = [self sliderCellWithTitle:cacheLimitTitle changedAction:@selector(cacheLimitAdjusted:) minimum:0.0 maximum:fiftyMega initialValue:currentCacheLimit];
@@ -60,11 +60,11 @@
 }
 
 - (void)cacheMediaResponsesToggled:(UISwitch *)sender {
-    [[FLEXNetworkRecorder defaultRecorder] setShouldCacheMediaResponses:sender.isOn];
+    [FLEXNetworkRecorder.defaultRecorder setShouldCacheMediaResponses:sender.isOn];
 }
 
 - (void)cacheLimitAdjusted:(UISlider *)sender {
-    [[FLEXNetworkRecorder defaultRecorder] setResponseCacheByteLimit:sender.value];
+    [FLEXNetworkRecorder.defaultRecorder setResponseCacheByteLimit:sender.value];
     self.cacheLimitCell.textLabel.text = [self titleForCacheLimitCellWithValue:sender.value];
 }
 
@@ -72,7 +72,7 @@
     [FLEXAlert makeSheet:^(FLEXAlert *make) {
         make.button(@"Cancel").cancelStyle();
         make.button(@"Clear Recorded Requests").destructiveStyle().handler(^(NSArray *strings) {
-            [[FLEXNetworkRecorder defaultRecorder] clearRecordedActivity];
+            [FLEXNetworkRecorder.defaultRecorder clearRecordedActivity];
         });
     } showFrom:self];
 

+ 4 - 4
Classes/Network/FLEXNetworkTransactionDetailTableViewController.m

@@ -232,7 +232,7 @@ typedef UIViewController *(^FLEXNetworkDetailRowSelectionFuture)(void);
     NSDictionary<NSString *, id> *titleAttributes = @{ NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Medium" size:12.0],
                                                        NSForegroundColorAttributeName : [UIColor colorWithWhite:0.5 alpha:1.0] };
     NSDictionary<NSString *, id> *detailAttributes = @{ NSFontAttributeName : UIFont.flex_defaultTableCellFont,
-                                                        NSForegroundColorAttributeName : [FLEXColor primaryTextColor] };
+                                                        NSForegroundColorAttributeName : FLEXColor.primaryTextColor };
 
     NSString *title = [NSString stringWithFormat:@"%@: ", row.title];
     NSString *detailText = row.detailText ?: @"";
@@ -311,7 +311,7 @@ typedef UIViewController *(^FLEXNetworkDetailRowSelectionFuture)(void);
 
     FLEXNetworkDetailRow *responseBodyRow = [FLEXNetworkDetailRow new];
     responseBodyRow.title = @"Response Body";
-    NSData *responseData = [[FLEXNetworkRecorder defaultRecorder] cachedResponseBodyForTransaction:transaction];
+    NSData *responseData = [FLEXNetworkRecorder.defaultRecorder cachedResponseBodyForTransaction:transaction];
     if (responseData.length > 0) {
         responseBodyRow.detailText = @"tap to view";
 
@@ -367,7 +367,7 @@ typedef UIViewController *(^FLEXNetworkDetailRowSelectionFuture)(void);
     startTimeFormatter.dateFormat = @"yyyy-MM-dd HH:mm:ss.SSS";
 
     FLEXNetworkDetailRow *localStartTimeRow = [FLEXNetworkDetailRow new];
-    localStartTimeRow.title = [NSString stringWithFormat:@"Start Time (%@)", [[NSTimeZone localTimeZone] abbreviationForDate:transaction.startTime]];
+    localStartTimeRow.title = [NSString stringWithFormat:@"Start Time (%@)", [NSTimeZone.localTimeZone abbreviationForDate:transaction.startTime]];
     localStartTimeRow.detailText = [startTimeFormatter stringFromDate:transaction.startTime];
     [rows addObject:localStartTimeRow];
 
@@ -473,7 +473,7 @@ typedef UIViewController *(^FLEXNetworkDetailRowSelectionFuture)(void);
 }
 
 + (UIViewController *)detailViewControllerForMIMEType:(NSString *)mimeType data:(NSData *)data {
-    FLEXCustomContentViewerFuture makeCustomViewer = [FLEXManager sharedManager].customContentTypeViewers[mimeType.lowercaseString];
+    FLEXCustomContentViewerFuture makeCustomViewer = FLEXManager.sharedManager.customContentTypeViewers[mimeType.lowercaseString];
 
     if (makeCustomViewer) {
         UIViewController *viewer = makeCustomViewer(data);

+ 1 - 1
Classes/Network/FLEXNetworkTransactionTableViewCell.m

@@ -77,7 +77,7 @@ NSString *const kFLEXNetworkTransactionCellIdentifier = @"kFLEXNetworkTransactio
     self.nameLabel.text = [self nameLabelText];
     CGSize nameLabelPreferredSize = [self.nameLabel sizeThatFits:CGSizeMake(availableTextWidth, CGFLOAT_MAX)];
     self.nameLabel.frame = CGRectMake(textOriginX, kVerticalPadding, availableTextWidth, nameLabelPreferredSize.height);
-    self.nameLabel.textColor = (self.transaction.error || [FLEXUtility isErrorStatusCodeFromURLResponse:self.transaction.response]) ? UIColor.redColor : [FLEXColor primaryTextColor];
+    self.nameLabel.textColor = (self.transaction.error || [FLEXUtility isErrorStatusCodeFromURLResponse:self.transaction.response]) ? UIColor.redColor : FLEXColor.primaryTextColor;
 
     self.pathLabel.text = [self pathLabelText];
     CGSize pathLabelPreferredSize = [self.pathLabel sizeThatFits:CGSizeMake(availableTextWidth, CGFLOAT_MAX)];

+ 50 - 50
Classes/Network/PonyDebugger/FLEXNetworkObserver.m

@@ -118,7 +118,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
 }
 
 + (NSString *)nextRequestID {
-    return [[NSUUID UUID] UUIDString];
+    return NSUUID.UUID.UUIDString;
 }
 
 #pragma mark Delegate Injection Convenience Methods
@@ -252,7 +252,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
         Method originalCancel = class_getInstanceMethod(class, selector);
 
         void (^swizzleBlock)(NSURLConnection *) = ^(NSURLConnection *slf) {
-            [[FLEXNetworkObserver sharedObserver] connectionWillCancel:slf];
+            [FLEXNetworkObserver.sharedObserver connectionWillCancel:slf];
             ((void(*)(id, SEL))objc_msgSend)(slf, swizzledSelector);
         };
 
@@ -291,7 +291,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
              // make sure other threads inspecting the request won't trigger a race to finalize the parser.
              [slf.currentRequest HTTPBody];
 
-            [[FLEXNetworkObserver sharedObserver] URLSessionTaskWillResume:slf];
+            [FLEXNetworkObserver.sharedObserver URLSessionTaskWillResume:slf];
             ((void(*)(id, SEL))objc_msgSend)(slf, swizzledSelector);
         };
 
@@ -314,16 +314,16 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
         void (^asyncSwizzleBlock)(Class, NSURLRequest *, NSOperationQueue *, NSURLConnectionAsyncCompletion) = ^(Class slf, NSURLRequest *request, NSOperationQueue *queue, NSURLConnectionAsyncCompletion completion) {
             if (FLEXNetworkObserver.isEnabled) {
                 NSString *requestID = [self nextRequestID];
-                [[FLEXNetworkRecorder defaultRecorder] recordRequestWillBeSentWithRequestID:requestID request:request redirectResponse:nil];
+                [FLEXNetworkRecorder.defaultRecorder recordRequestWillBeSentWithRequestID:requestID request:request redirectResponse:nil];
                 NSString *mechanism = [self mechanismFromClassMethod:selector onClass:class];
-                [[FLEXNetworkRecorder defaultRecorder] recordMechanism:mechanism forRequestID:requestID];
+                [FLEXNetworkRecorder.defaultRecorder recordMechanism:mechanism forRequestID:requestID];
                 NSURLConnectionAsyncCompletion completionWrapper = ^(NSURLResponse *response, NSData *data, NSError *connectionError) {
-                    [[FLEXNetworkRecorder defaultRecorder] recordResponseReceivedWithRequestID:requestID response:response];
-                    [[FLEXNetworkRecorder defaultRecorder] recordDataReceivedWithRequestID:requestID dataLength:data.length];
+                    [FLEXNetworkRecorder.defaultRecorder recordResponseReceivedWithRequestID:requestID response:response];
+                    [FLEXNetworkRecorder.defaultRecorder recordDataReceivedWithRequestID:requestID dataLength:data.length];
                     if (connectionError) {
-                        [[FLEXNetworkRecorder defaultRecorder] recordLoadingFailedWithRequestID:requestID error:connectionError];
+                        [FLEXNetworkRecorder.defaultRecorder recordLoadingFailedWithRequestID:requestID error:connectionError];
                     } else {
-                        [[FLEXNetworkRecorder defaultRecorder] recordLoadingFinishedWithRequestID:requestID responseBody:data];
+                        [FLEXNetworkRecorder.defaultRecorder recordLoadingFinishedWithRequestID:requestID responseBody:data];
                     }
 
                     // Call through to the original completion handler
@@ -352,18 +352,18 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
             NSData *data = nil;
             if (FLEXNetworkObserver.isEnabled) {
                 NSString *requestID = [self nextRequestID];
-                [[FLEXNetworkRecorder defaultRecorder] recordRequestWillBeSentWithRequestID:requestID request:request redirectResponse:nil];
+                [FLEXNetworkRecorder.defaultRecorder recordRequestWillBeSentWithRequestID:requestID request:request redirectResponse:nil];
                 NSString *mechanism = [self mechanismFromClassMethod:selector onClass:class];
-                [[FLEXNetworkRecorder defaultRecorder] recordMechanism:mechanism forRequestID:requestID];
+                [FLEXNetworkRecorder.defaultRecorder recordMechanism:mechanism forRequestID:requestID];
                 NSError *temporaryError = nil;
                 NSURLResponse *temporaryResponse = nil;
                 data = ((id(*)(id, SEL, id, NSURLResponse **, NSError **))objc_msgSend)(slf, swizzledSelector, request, &temporaryResponse, &temporaryError);
-                [[FLEXNetworkRecorder defaultRecorder] recordResponseReceivedWithRequestID:requestID response:temporaryResponse];
-                [[FLEXNetworkRecorder defaultRecorder] recordDataReceivedWithRequestID:requestID dataLength:data.length];
+                [FLEXNetworkRecorder.defaultRecorder recordResponseReceivedWithRequestID:requestID response:temporaryResponse];
+                [FLEXNetworkRecorder.defaultRecorder recordDataReceivedWithRequestID:requestID dataLength:data.length];
                 if (temporaryError) {
-                    [[FLEXNetworkRecorder defaultRecorder] recordLoadingFailedWithRequestID:requestID error:temporaryError];
+                    [FLEXNetworkRecorder.defaultRecorder recordLoadingFailedWithRequestID:requestID error:temporaryError];
                 } else {
-                    [[FLEXNetworkRecorder defaultRecorder] recordLoadingFinishedWithRequestID:requestID responseBody:data];
+                    [FLEXNetworkRecorder.defaultRecorder recordLoadingFinishedWithRequestID:requestID responseBody:data];
                 }
                 if (error) {
                     *error = temporaryError;
@@ -479,19 +479,19 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
 
 + (NSURLSessionAsyncCompletion)asyncCompletionWrapperForRequestID:(NSString *)requestID mechanism:(NSString *)mechanism completion:(NSURLSessionAsyncCompletion)completion {
     NSURLSessionAsyncCompletion completionWrapper = ^(id fileURLOrData, NSURLResponse *response, NSError *error) {
-        [[FLEXNetworkRecorder defaultRecorder] recordMechanism:mechanism forRequestID:requestID];
-        [[FLEXNetworkRecorder defaultRecorder] recordResponseReceivedWithRequestID:requestID response:response];
+        [FLEXNetworkRecorder.defaultRecorder recordMechanism:mechanism forRequestID:requestID];
+        [FLEXNetworkRecorder.defaultRecorder recordResponseReceivedWithRequestID:requestID response:response];
         NSData *data = nil;
         if ([fileURLOrData isKindOfClass:[NSURL class]]) {
             data = [NSData dataWithContentsOfURL:fileURLOrData];
         } else if ([fileURLOrData isKindOfClass:[NSData class]]) {
             data = fileURLOrData;
         }
-        [[FLEXNetworkRecorder defaultRecorder] recordDataReceivedWithRequestID:requestID dataLength:data.length];
+        [FLEXNetworkRecorder.defaultRecorder recordDataReceivedWithRequestID:requestID dataLength:data.length];
         if (error) {
-            [[FLEXNetworkRecorder defaultRecorder] recordLoadingFailedWithRequestID:requestID error:error];
+            [FLEXNetworkRecorder.defaultRecorder recordLoadingFailedWithRequestID:requestID error:error];
         } else {
-            [[FLEXNetworkRecorder defaultRecorder] recordLoadingFinishedWithRequestID:requestID responseBody:data];
+            [FLEXNetworkRecorder.defaultRecorder recordLoadingFinishedWithRequestID:requestID responseBody:data];
         }
 
         // Call through to the original completion handler
@@ -516,7 +516,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef NSURLRequest *(^NSURLConnectionWillSendRequestBlock)(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSURLRequest *request, NSURLResponse *response);
     
     NSURLConnectionWillSendRequestBlock undefinedBlock = ^NSURLRequest *(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSURLRequest *request, NSURLResponse *response) {
-        [[FLEXNetworkObserver sharedObserver] connection:connection willSendRequest:request redirectResponse:response delegate:slf];
+        [FLEXNetworkObserver.sharedObserver connection:connection willSendRequest:request redirectResponse:response delegate:slf];
         return request;
     };
     
@@ -547,7 +547,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLConnectionDidReceiveResponseBlock)(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSURLResponse *response);
     
     NSURLConnectionDidReceiveResponseBlock undefinedBlock = ^(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSURLResponse *response) {
-        [[FLEXNetworkObserver sharedObserver] connection:connection didReceiveResponse:response delegate:slf];
+        [FLEXNetworkObserver.sharedObserver connection:connection didReceiveResponse:response delegate:slf];
     };
     
     NSURLConnectionDidReceiveResponseBlock implementationBlock = ^(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSURLResponse *response) {
@@ -575,7 +575,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLConnectionDidReceiveDataBlock)(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSData *data);
     
     NSURLConnectionDidReceiveDataBlock undefinedBlock = ^(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSData *data) {
-        [[FLEXNetworkObserver sharedObserver] connection:connection didReceiveData:data delegate:slf];
+        [FLEXNetworkObserver.sharedObserver connection:connection didReceiveData:data delegate:slf];
     };
     
     NSURLConnectionDidReceiveDataBlock implementationBlock = ^(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSData *data) {
@@ -603,7 +603,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLConnectionDidFinishLoadingBlock)(id <NSURLConnectionDelegate> slf, NSURLConnection *connection);
     
     NSURLConnectionDidFinishLoadingBlock undefinedBlock = ^(id <NSURLConnectionDelegate> slf, NSURLConnection *connection) {
-        [[FLEXNetworkObserver sharedObserver] connectionDidFinishLoading:connection delegate:slf];
+        [FLEXNetworkObserver.sharedObserver connectionDidFinishLoading:connection delegate:slf];
     };
     
     NSURLConnectionDidFinishLoadingBlock implementationBlock = ^(id <NSURLConnectionDelegate> slf, NSURLConnection *connection) {
@@ -627,7 +627,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLConnectionDidFailWithErrorBlock)(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSError *error);
     
     NSURLConnectionDidFailWithErrorBlock undefinedBlock = ^(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSError *error) {
-        [[FLEXNetworkObserver sharedObserver] connection:connection didFailWithError:error delegate:slf];
+        [FLEXNetworkObserver.sharedObserver connection:connection didFailWithError:error delegate:slf];
     };
     
     NSURLConnectionDidFailWithErrorBlock implementationBlock = ^(id <NSURLConnectionDelegate> slf, NSURLConnection *connection, NSError *error) {
@@ -652,13 +652,13 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLSessionWillPerformHTTPRedirectionBlock)(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionTask *task, NSHTTPURLResponse *response, NSURLRequest *newRequest, void(^completionHandler)(NSURLRequest *));
     
     NSURLSessionWillPerformHTTPRedirectionBlock undefinedBlock = ^(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionTask *task, NSHTTPURLResponse *response, NSURLRequest *newRequest, void(^completionHandler)(NSURLRequest *)) {
-        [[FLEXNetworkObserver sharedObserver] URLSession:session task:task willPerformHTTPRedirection:response newRequest:newRequest completionHandler:completionHandler delegate:slf];
+        [FLEXNetworkObserver.sharedObserver URLSession:session task:task willPerformHTTPRedirection:response newRequest:newRequest completionHandler:completionHandler delegate:slf];
         completionHandler(newRequest);
     };
 
     NSURLSessionWillPerformHTTPRedirectionBlock implementationBlock = ^(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionTask *task, NSHTTPURLResponse *response, NSURLRequest *newRequest, void(^completionHandler)(NSURLRequest *)) {
         [self sniffWithoutDuplicationForObject:session selector:selector sniffingBlock:^{
-            [[FLEXNetworkObserver sharedObserver] URLSession:session task:task willPerformHTTPRedirection:response newRequest:newRequest completionHandler:completionHandler delegate:slf];
+            [FLEXNetworkObserver.sharedObserver URLSession:session task:task willPerformHTTPRedirection:response newRequest:newRequest completionHandler:completionHandler delegate:slf];
         } originalImplementationBlock:^{
             ((id(*)(id, SEL, id, id, id, id, void(^)(NSURLRequest *)))objc_msgSend)(slf, swizzledSelector, session, task, response, newRequest, completionHandler);
         }];
@@ -679,7 +679,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLSessionDidReceiveDataBlock)(id <NSURLSessionDataDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data);
     
     NSURLSessionDidReceiveDataBlock undefinedBlock = ^(id <NSURLSessionDataDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data) {
-        [[FLEXNetworkObserver sharedObserver] URLSession:session dataTask:dataTask didReceiveData:data delegate:slf];
+        [FLEXNetworkObserver.sharedObserver URLSession:session dataTask:dataTask didReceiveData:data delegate:slf];
     };
     
     NSURLSessionDidReceiveDataBlock implementationBlock = ^(id <NSURLSessionDataDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data) {
@@ -705,7 +705,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLSessionDidBecomeDownloadTaskBlock)(id <NSURLSessionDataDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask);
 
     NSURLSessionDidBecomeDownloadTaskBlock undefinedBlock = ^(id <NSURLSessionDataDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask) {
-        [[FLEXNetworkObserver sharedObserver] URLSession:session dataTask:dataTask didBecomeDownloadTask:downloadTask delegate:slf];
+        [FLEXNetworkObserver.sharedObserver URLSession:session dataTask:dataTask didBecomeDownloadTask:downloadTask delegate:slf];
     };
 
     NSURLSessionDidBecomeDownloadTaskBlock implementationBlock = ^(id <NSURLSessionDataDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask) {
@@ -730,13 +730,13 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLSessionDidReceiveResponseBlock)(id <NSURLSessionDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response, void(^completionHandler)(NSURLSessionResponseDisposition disposition));
     
     NSURLSessionDidReceiveResponseBlock undefinedBlock = ^(id <NSURLSessionDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response, void(^completionHandler)(NSURLSessionResponseDisposition disposition)) {
-        [[FLEXNetworkObserver sharedObserver] URLSession:session dataTask:dataTask didReceiveResponse:response completionHandler:completionHandler delegate:slf];
+        [FLEXNetworkObserver.sharedObserver URLSession:session dataTask:dataTask didReceiveResponse:response completionHandler:completionHandler delegate:slf];
         completionHandler(NSURLSessionResponseAllow);
     };
     
     NSURLSessionDidReceiveResponseBlock implementationBlock = ^(id <NSURLSessionDelegate> slf, NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response, void(^completionHandler)(NSURLSessionResponseDisposition disposition)) {
         [self sniffWithoutDuplicationForObject:session selector:selector sniffingBlock:^{
-            [[FLEXNetworkObserver sharedObserver] URLSession:session dataTask:dataTask didReceiveResponse:response completionHandler:completionHandler delegate:slf];
+            [FLEXNetworkObserver.sharedObserver URLSession:session dataTask:dataTask didReceiveResponse:response completionHandler:completionHandler delegate:slf];
         } originalImplementationBlock:^{
             ((void(*)(id, SEL, id, id, id, void(^)(NSURLSessionResponseDisposition)))objc_msgSend)(slf, swizzledSelector, session, dataTask, response, completionHandler);
         }];
@@ -756,7 +756,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLSessionTaskDidCompleteWithErrorBlock)(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionTask *task, NSError *error);
 
     NSURLSessionTaskDidCompleteWithErrorBlock undefinedBlock = ^(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionTask *task, NSError *error) {
-        [[FLEXNetworkObserver sharedObserver] URLSession:session task:task didCompleteWithError:error delegate:slf];
+        [FLEXNetworkObserver.sharedObserver URLSession:session task:task didCompleteWithError:error delegate:slf];
     };
 
     NSURLSessionTaskDidCompleteWithErrorBlock implementationBlock = ^(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionTask *task, NSError *error) {
@@ -805,7 +805,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
 
     NSURLSessionDownloadTaskDidFinishDownloadingBlock undefinedBlock = ^(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionDownloadTask *task, NSURL *location) {
         NSData *data = [NSData dataWithContentsOfFile:location.relativePath];
-        [[FLEXNetworkObserver sharedObserver] URLSession:session task:task didFinishDownloadingToURL:location data:data delegate:slf];
+        [FLEXNetworkObserver.sharedObserver URLSession:session task:task didFinishDownloadingToURL:location data:data delegate:slf];
     };
 
     NSURLSessionDownloadTaskDidFinishDownloadingBlock implementationBlock = ^(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionDownloadTask *task, NSURL *location) {
@@ -829,7 +829,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
     typedef void (^NSURLSessionDownloadTaskDidWriteDataBlock)(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionDownloadTask *task, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite);
 
     NSURLSessionDownloadTaskDidWriteDataBlock undefinedBlock = ^(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionDownloadTask *task, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite) {
-        [[FLEXNetworkObserver sharedObserver] URLSession:session downloadTask:task didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite delegate:slf];
+        [FLEXNetworkObserver.sharedObserver URLSession:session downloadTask:task didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite delegate:slf];
     };
 
     NSURLSessionDownloadTaskDidWriteDataBlock implementationBlock = ^(id <NSURLSessionTaskDelegate> slf, NSURLSession *session, NSURLSessionDownloadTask *task, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite) {
@@ -901,9 +901,9 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         NSString *requestID = [[self class] requestIDForConnectionOrTask:connection];
         FLEXInternalRequestState *requestState = [self requestStateForRequestID:requestID];
         requestState.request = request;
-        [[FLEXNetworkRecorder defaultRecorder] recordRequestWillBeSentWithRequestID:requestID request:request redirectResponse:response];
+        [FLEXNetworkRecorder.defaultRecorder recordRequestWillBeSentWithRequestID:requestID request:request redirectResponse:response];
         NSString *mechanism = [NSString stringWithFormat:@"NSURLConnection (delegate: %@)", [delegate class]];
-        [[FLEXNetworkRecorder defaultRecorder] recordMechanism:mechanism forRequestID:requestID];
+        [FLEXNetworkRecorder.defaultRecorder recordMechanism:mechanism forRequestID:requestID];
     }];
 }
 
@@ -920,7 +920,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         }
         requestState.dataAccumulator = dataAccumulator;
 
-        [[FLEXNetworkRecorder defaultRecorder] recordResponseReceivedWithRequestID:requestID response:response];
+        [FLEXNetworkRecorder.defaultRecorder recordResponseReceivedWithRequestID:requestID response:response];
     }];
 }
 
@@ -931,7 +931,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         NSString *requestID = [[self class] requestIDForConnectionOrTask:connection];
         FLEXInternalRequestState *requestState = [self requestStateForRequestID:requestID];
         [requestState.dataAccumulator appendData:data];
-        [[FLEXNetworkRecorder defaultRecorder] recordDataReceivedWithRequestID:requestID dataLength:data.length];
+        [FLEXNetworkRecorder.defaultRecorder recordDataReceivedWithRequestID:requestID dataLength:data.length];
     }];
 }
 
@@ -939,7 +939,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
     [self performBlock:^{
         NSString *requestID = [[self class] requestIDForConnectionOrTask:connection];
         FLEXInternalRequestState *requestState = [self requestStateForRequestID:requestID];
-        [[FLEXNetworkRecorder defaultRecorder] recordLoadingFinishedWithRequestID:requestID responseBody:requestState.dataAccumulator];
+        [FLEXNetworkRecorder.defaultRecorder recordLoadingFinishedWithRequestID:requestID responseBody:requestState.dataAccumulator];
         [self removeRequestStateForRequestID:requestID];
     }];
 }
@@ -952,7 +952,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         // Cancellations can occur prior to the willSendRequest:... NSURLConnection delegate call.
         // These are pretty common and clutter up the logs. Only record the failure if the recorder already knows about the request through willSendRequest:...
         if (requestState.request) {
-            [[FLEXNetworkRecorder defaultRecorder] recordLoadingFailedWithRequestID:requestID error:error];
+            [FLEXNetworkRecorder.defaultRecorder recordLoadingFailedWithRequestID:requestID error:error];
         }
         
         [self removeRequestStateForRequestID:requestID];
@@ -976,7 +976,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
 - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest *))completionHandler delegate:(id<NSURLSessionDelegate>)delegate {
     [self performBlock:^{
         NSString *requestID = [[self class] requestIDForConnectionOrTask:task];
-        [[FLEXNetworkRecorder defaultRecorder] recordRequestWillBeSentWithRequestID:requestID request:request redirectResponse:response];
+        [FLEXNetworkRecorder.defaultRecorder recordRequestWillBeSentWithRequestID:requestID request:request redirectResponse:response];
     }];
 }
 
@@ -994,9 +994,9 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         requestState.dataAccumulator = dataAccumulator;
 
         NSString *requestMechanism = [NSString stringWithFormat:@"NSURLSessionDataTask (delegate: %@)", [delegate class]];
-        [[FLEXNetworkRecorder defaultRecorder] recordMechanism:requestMechanism forRequestID:requestID];
+        [FLEXNetworkRecorder.defaultRecorder recordMechanism:requestMechanism forRequestID:requestID];
 
-        [[FLEXNetworkRecorder defaultRecorder] recordResponseReceivedWithRequestID:requestID response:response];
+        [FLEXNetworkRecorder.defaultRecorder recordResponseReceivedWithRequestID:requestID response:response];
     }];
 }
 
@@ -1018,7 +1018,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
 
         [requestState.dataAccumulator appendData:data];
 
-        [[FLEXNetworkRecorder defaultRecorder] recordDataReceivedWithRequestID:requestID dataLength:data.length];
+        [FLEXNetworkRecorder.defaultRecorder recordDataReceivedWithRequestID:requestID dataLength:data.length];
     }];
 }
 
@@ -1028,9 +1028,9 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         FLEXInternalRequestState *requestState = [self requestStateForRequestID:requestID];
 
         if (error) {
-            [[FLEXNetworkRecorder defaultRecorder] recordLoadingFailedWithRequestID:requestID error:error];
+            [FLEXNetworkRecorder.defaultRecorder recordLoadingFailedWithRequestID:requestID error:error];
         } else {
-            [[FLEXNetworkRecorder defaultRecorder] recordLoadingFinishedWithRequestID:requestID responseBody:requestState.dataAccumulator];
+            [FLEXNetworkRecorder.defaultRecorder recordLoadingFinishedWithRequestID:requestID responseBody:requestState.dataAccumulator];
         }
 
         [self removeRequestStateForRequestID:requestID];
@@ -1045,13 +1045,13 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         if (!requestState.dataAccumulator) {
             NSUInteger unsignedBytesExpectedToWrite = totalBytesExpectedToWrite > 0 ? (NSUInteger)totalBytesExpectedToWrite : 0;
             requestState.dataAccumulator = [[NSMutableData alloc] initWithCapacity:unsignedBytesExpectedToWrite];
-            [[FLEXNetworkRecorder defaultRecorder] recordResponseReceivedWithRequestID:requestID response:downloadTask.response];
+            [FLEXNetworkRecorder.defaultRecorder recordResponseReceivedWithRequestID:requestID response:downloadTask.response];
 
             NSString *requestMechanism = [NSString stringWithFormat:@"NSURLSessionDownloadTask (delegate: %@)", [delegate class]];
-            [[FLEXNetworkRecorder defaultRecorder] recordMechanism:requestMechanism forRequestID:requestID];
+            [FLEXNetworkRecorder.defaultRecorder recordMechanism:requestMechanism forRequestID:requestID];
         }
 
-        [[FLEXNetworkRecorder defaultRecorder] recordDataReceivedWithRequestID:requestID dataLength:bytesWritten];
+        [FLEXNetworkRecorder.defaultRecorder recordDataReceivedWithRequestID:requestID dataLength:bytesWritten];
     }];
 }
 
@@ -1073,7 +1073,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         if (!requestState.request) {
             requestState.request = task.currentRequest;
 
-            [[FLEXNetworkRecorder defaultRecorder] recordRequestWillBeSentWithRequestID:requestID request:task.currentRequest redirectResponse:nil];
+            [FLEXNetworkRecorder.defaultRecorder recordRequestWillBeSentWithRequestID:requestID request:task.currentRequest redirectResponse:nil];
         }
     }];
 }

+ 1 - 1
Classes/ObjectExplorers/Sections/FLEXDefaultsContentSection.m

@@ -48,7 +48,7 @@
     if (!_keys) {
         if (self.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;

+ 1 - 1
Classes/Toolbar/FLEXExplorerToolbar.m

@@ -214,7 +214,7 @@
 }
 
 + (CGFloat)dragHandleWidth {
-    return [FLEXResources dragHandle].size.width;
+    return FLEXResources.dragHandle.size.width;
 }
 
 + (CGFloat)descriptionLabelHeight {

+ 2 - 2
Classes/Toolbar/FLEXToolbarItem.m

@@ -63,11 +63,11 @@
 }
 
 + (UIColor *)highlightedBackgroundColor {
-    return [FLEXColor toolbarItemHighlightedColor];
+    return FLEXColor.toolbarItemHighlightedColor;
 }
 
 + (UIColor *)selectedBackgroundColor {
-    return [FLEXColor toolbarItemSelectedColor];
+    return FLEXColor.toolbarItemSelectedColor;
 }
 
 + (UIColor *)defaultBackgroundColor {

+ 1 - 1
Classes/Utility/Categories/NSDictionary+ObjcRuntime.m

@@ -89,7 +89,7 @@
 + (instancetype)attributesDictionaryForProperty:(objc_property_t)property {
     NSMutableDictionary *attrs = [NSMutableDictionary new];
 
-    for (NSString *key in [FLEXRuntimeUtility allPropertyAttributeKeys]) {
+    for (NSString *key in FLEXRuntimeUtility.allPropertyAttributeKeys) {
         char *value = property_copyAttributeValue(property, key.UTF8String);
         if (value) {
             attrs[key] = [[NSString alloc]

+ 2 - 2
Classes/Utility/Categories/NSObject+Reflection.m

@@ -121,8 +121,8 @@ NSArray<FLEXProtocol *> *FLEXGetConformedProtocols(Class cls) {
     id filterFunc = ^BOOL(FLEXMethod *method, NSUInteger idx) {
         return [method.name hasPrefix:@"flex_"];
     };
-    NSArray *instanceMethods = [[NSObject flex_allInstanceMethods] flex_filtered:filterFunc];
-    NSArray *classMethods = [[NSObject flex_allClassMethods] flex_filtered:filterFunc];
+    NSArray *instanceMethods = [NSObject.flex_allInstanceMethods flex_filtered:filterFunc];
+    NSArray *classMethods = [NSObject.flex_allClassMethods flex_filtered:filterFunc];
     
     FLEXClassBuilder *proxy     = [FLEXClassBuilder builderForClass:NSProxyClass];
     FLEXClassBuilder *proxyMeta = [FLEXClassBuilder builderForClass:NSProxy_meta];

+ 3 - 3
Classes/Utility/FLEXUtility.m

@@ -160,7 +160,7 @@
     static UIColor *patternColor = nil;
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
-        UIImage *indentationPatternImage = [FLEXResources hierarchyIndentPattern];
+        UIImage *indentationPatternImage = FLEXResources.hierarchyIndentPattern;
         patternColor = [UIColor colorWithPatternImage:indentationPatternImage];
 
 #if FLEX_AT_LEAST_IOS13_SDK
@@ -169,7 +169,7 @@
             UIGraphicsBeginImageContextWithOptions(
                 indentationPatternImage.size, NO, indentationPatternImage.scale
             );
-            [[FLEXColor iconColor] set];
+            [FLEXColor.iconColor set];
             [indentationPatternImage drawInRect:CGRectMake(
                 0, 0, indentationPatternImage.size.width, indentationPatternImage.size.height
             )];
@@ -194,7 +194,7 @@
 }
 
 + (NSString *)applicationName {
-    return [FLEXUtility applicationImageName].lastPathComponent;
+    return FLEXUtility.applicationImageName.lastPathComponent;
 }
 
 + (NSString *)pointerToString:(void *)ptr {

+ 1 - 1
Classes/Utility/Keyboard/FLEXKeyboardHelpViewController.m

@@ -24,7 +24,7 @@
     self.textView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
     [self.view addSubview:self.textView];
 #if TARGET_OS_SIMULATOR
-    self.textView.text = [[FLEXKeyboardShortcutManager sharedManager] keyboardShortcutsDescription];
+    self.textView.text = FLEXKeyboardShortcutManager.sharedManager.keyboardShortcutsDescription;
 #endif
     self.textView.backgroundColor = UIColor.blackColor;
     self.textView.textColor = UIColor.whiteColor;

+ 3 - 3
Classes/Utility/Keyboard/FLEXKeyboardShortcutManager.m

@@ -153,7 +153,7 @@
         
         void (^sendEventSwizzleBlock)(UIApplication *, UIEvent *) = ^(UIApplication *slf, UIEvent *event) {
             if (event.type == UIEventTypeTouches) {
-                FLEXKeyboardShortcutManager *keyboardManager = [FLEXKeyboardShortcutManager sharedManager];
+                FLEXKeyboardShortcutManager *keyboardManager = FLEXKeyboardShortcutManager.sharedManager;
                 NSInteger pressureLevel = 0;
                 if (keyboardManager.isPressingShift) {
                     pressureLevel++;
@@ -247,11 +247,11 @@ static const long kFLEXCommandKeyCode = 0xe3;
         isKeyDown = [event _isKeyDown];
     }
     
-    BOOL interactionEnabled = ![UIApplication.sharedApplication isIgnoringInteractionEvents];
+    BOOL interactionEnabled = !UIApplication.sharedApplication.isIgnoringInteractionEvents;
     BOOL hasFirstResponder = NO;
     if (isKeyDown && modifiedInput.length > 0 && interactionEnabled) {
         UIResponder *firstResponder = nil;
-        for (UIWindow *window in [FLEXUtility allWindows]) {
+        for (UIWindow *window in FLEXUtility.allWindows) {
             firstResponder = [window valueForKey:@"firstResponder"];
             if (firstResponder) {
                 hasFirstResponder = YES;

+ 1 - 1
Classes/Utility/Runtime/FLEXRuntimeUtility.m

@@ -505,7 +505,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
 + (id)objectValueFromEditableJSONString:(NSString *)string {
     id value = nil;
     // nil for empty string/whitespace
-    if ([string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length) {
+    if ([string stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet].length) {
         value = [NSJSONSerialization
             JSONObjectWithData:[string dataUsingEncoding:NSUTF8StringEncoding]
             options:NSJSONReadingAllowFragments

+ 1 - 1
Classes/ViewHierarchy/FLEXHierarchyViewController.m

@@ -46,7 +46,7 @@ typedef NS_ENUM(NSUInteger, FLEXHierarchyViewMode) {
 - (id)initWithDelegate:(id)delegate viewsAtTap:(NSArray<UIView *> *)viewsAtTap selectedView:(UIView *)view {
     self = [super init];
     if (self) {
-        NSArray<UIWindow *> *allWindows = [FLEXUtility allWindows];
+        NSArray<UIWindow *> *allWindows = FLEXUtility.allWindows;
         _hierarchyDelegate = delegate;
         _treeViewController = [FLEXHierarchyTableViewController
             windows:allWindows viewsAtTap:viewsAtTap selectedView:view

+ 1 - 1
Classes/ViewHierarchy/FLEXImagePreviewViewController.m

@@ -103,7 +103,7 @@
     static BOOL canSaveToCameraRoll = NO, didShowWarning = NO;
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
-        if ([UIDevice currentDevice].systemVersion.floatValue < 10) {
+        if (UIDevice.currentDevice.systemVersion.floatValue < 10) {
             canSaveToCameraRoll = YES;
             return;
         }

+ 4 - 4
Classes/ViewHierarchy/SnapshotExplorer/FHSRangeSlider.m

@@ -45,10 +45,10 @@
         return iv;
     };
 
-    _track = newSubviewImageView([FLEXResources rangeSliderTrack]);
-    _fill = newSubviewImageView([FLEXResources rangeSliderFill]);
-    _leftHandle = newSubviewImageView([FLEXResources rangeSliderLeftHandle]);
-    _rightHandle = newSubviewImageView([FLEXResources rangeSliderRightHandle]);
+    _track = newSubviewImageView(FLEXResources.rangeSliderTrack);
+    _fill = newSubviewImageView(FLEXResources.rangeSliderFill);
+    _leftHandle = newSubviewImageView(FLEXResources.rangeSliderLeftHandle);
+    _rightHandle = newSubviewImageView(FLEXResources.rangeSliderRightHandle);
 }
 
 #pragma mark - Setters / Private

+ 1 - 1
Classes/ViewHierarchy/SnapshotExplorer/FHSSnapshotView.m

@@ -101,7 +101,7 @@
 
     // Create new scene (possibly discarding old scene)
     SCNScene *scene = [SCNScene new];
-    scene.background.contents = [FLEXColor primaryBackgroundColor];
+    scene.background.contents = FLEXColor.primaryBackgroundColor;
     self.sceneView.scene = scene;
 
     NSInteger depth = 0;

+ 1 - 1
Classes/ViewHierarchy/SnapshotExplorer/FHSView.m

@@ -24,7 +24,7 @@
     if (self) {
         _view = view;
         _inScrollView = inScrollView;
-        _identifier = [NSUUID UUID].UUIDString;
+        _identifier = NSUUID.UUID.UUIDString;
 
         UIViewController *controller = [FLEXUtility viewControllerForView:view];
         if (controller) {

+ 3 - 3
Classes/ViewHierarchy/TreeExplorer/FLEXHierarchyTableViewCell.m

@@ -34,7 +34,7 @@
     self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
     if (self) {
         self.depthIndicatorView = [UIView new];
-        self.depthIndicatorView.backgroundColor = [FLEXUtility hierarchyIndentPatternColor];
+        self.depthIndicatorView.backgroundColor = FLEXUtility.hierarchyIndentPatternColor;
         [self.contentView addSubview:self.depthIndicatorView];
         
         UIImage *defaultCircleImage = [FLEXUtility circularImageWithColor:UIColor.blackColor radius:5];
@@ -70,7 +70,7 @@
     
     // UITableViewCell changes all subviews in the contentView to backgroundColor = clearColor.
     // We want to preserve the hierarchy background color when highlighted.
-    self.depthIndicatorView.backgroundColor = [FLEXUtility hierarchyIndentPatternColor];
+    self.depthIndicatorView.backgroundColor = FLEXUtility.hierarchyIndentPatternColor;
     
     self.viewBackgroundColorView.backgroundColor = originalColour;
 }
@@ -80,7 +80,7 @@
     [super setSelected:selected animated:animated];
     
     // See setHighlighted above.
-    self.depthIndicatorView.backgroundColor = [FLEXUtility hierarchyIndentPatternColor];
+    self.depthIndicatorView.backgroundColor = FLEXUtility.hierarchyIndentPatternColor;
     
     self.viewBackgroundColorView.backgroundColor = originalColour;
 }

+ 6 - 6
FLEXTests/FLEXTests.m

@@ -25,10 +25,10 @@
 @implementation FLEXTests
 
 - (void)testRuntimeAdditions {
-    XCTAssertEqual(1, [NSObject flex_classHierarchy].count);
-    XCTAssertEqual(4, [FLEXTests flex_classHierarchy].count);
-    XCTAssertEqual([FLEXTests flex_classHierarchy].firstObject, [self class]);
-    XCTAssertEqual([FLEXTests flex_classHierarchy].lastObject, [NSObject class]);
+    XCTAssertEqual(1, NSObject.flex_classHierarchy.count);
+    XCTAssertEqual(4, FLEXTests.flex_classHierarchy.count);
+    XCTAssertEqual(FLEXTests.flex_classHierarchy.firstObject, [self class]);
+    XCTAssertEqual(FLEXTests.flex_classHierarchy.lastObject, [NSObject class]);
 }
 
 - (void)testAssumptionsAboutClasses {
@@ -48,7 +48,7 @@
     XCTAssertEqual(object_getClass(meta), meta);
 
     // Superclass of a root class is nil
-    XCTAssertNil([NSObject superclass]);
+    XCTAssertNil(NSObject.superclass);
 }
 
 - (void)testAssumptionsAboutMessageSending {
@@ -94,7 +94,7 @@
 }
 
 - (void)testGetClassProperties {
-    NSArray *props = [NSBundle flex_allClassProperties];
+    NSArray *props = NSBundle.flex_allClassProperties;
     props = [props flex_filtered:^BOOL(FLEXProperty *obj, NSUInteger idx) {
         return [obj.name isEqualToString:@"mainBundle"];
     }];