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

Merge pull request #85 from dlo/master

Use Objective-C 2.0 subscripting
Ryan Olson лет назад: 10
Родитель
Сommit
c66dd2e7d3

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

@@ -31,7 +31,7 @@
             inputView.targetSize = FLEXArgumentInputViewSizeSmall;
             
             if (fieldIndex < [customTitles count]) {
-                inputView.title = [customTitles objectAtIndex:fieldIndex];
+                inputView.title = customTitles[fieldIndex];
             } else {
                 inputView.title = [NSString stringWithFormat:@"%@ field %lu (%@)", structName, (unsigned long)fieldIndex, prettyTypeEncoding];
             }
@@ -72,7 +72,7 @@
                 [FLEXRuntimeUtility enumerateTypesInStructEncoding:structTypeEncoding usingBlock:^(NSString *structName, const char *fieldTypeEncoding, NSString *prettyTypeEncoding, NSUInteger fieldIndex, NSUInteger fieldOffset) {
                     
                     void *fieldPointer = unboxedValue + fieldOffset;
-                    FLEXArgumentInputView *inputView = [self.argumentInputViews objectAtIndex:fieldIndex];
+                    FLEXArgumentInputView *inputView = self.argumentInputViews[fieldIndex];
                     
                     if (fieldTypeEncoding[0] == @encode(id)[0] || fieldTypeEncoding[0] == @encode(Class)[0]) {
                         inputView.inputValue = (__bridge id)fieldPointer;
@@ -102,7 +102,7 @@
         [FLEXRuntimeUtility enumerateTypesInStructEncoding:structTypeEncoding usingBlock:^(NSString *structName, const char *fieldTypeEncoding, NSString *prettyTypeEncoding, NSUInteger fieldIndex, NSUInteger fieldOffset) {
             
             void *fieldPointer = unboxedStruct + fieldOffset;
-            FLEXArgumentInputView *inputView = [self.argumentInputViews objectAtIndex:fieldIndex];
+            FLEXArgumentInputView *inputView = self.argumentInputViews[fieldIndex];
             
             if (fieldTypeEncoding[0] == @encode(id)[0] || fieldTypeEncoding[0] == @encode(Class)[0]) {
                 // Object fields

+ 2 - 2
Classes/ExplorerToolbar/FLEXExplorerViewController.m

@@ -331,9 +331,9 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
 {
     NSUInteger indexOfView = [self.viewsAtTapPoint indexOfObject:object];
     if (indexOfView != NSNotFound) {
-        UIView *view = [self.viewsAtTapPoint objectAtIndex:indexOfView];
+        UIView *view = self.viewsAtTapPoint[indexOfView];
         NSValue *key = [NSValue valueWithNonretainedObject:view];
-        UIView *outline = [self.outlineViewsForVisibleViews objectForKey:key];
+        UIView *outline = self.outlineViewsForVisibleViews[key];
         if (outline) {
             outline.frame = [self frameInLocalCoordinatesForView:view];
         }

+ 1 - 1
Classes/GlobalStateExplorers/FLEXClassesTableViewController.m

@@ -131,7 +131,7 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    NSString *className = [self.filteredClassNames objectAtIndex:indexPath.row];
+    NSString *className = self.filteredClassNames[indexPath.row];
     Class selectedClass = objc_getClass([className UTF8String]);
     FLEXObjectExplorerViewController *objectExplorer = [FLEXObjectExplorerFactory explorerViewControllerForObject:selectedClass];
     [self.navigationController pushViewController:objectExplorer animated:YES];

+ 8 - 8
Classes/GlobalStateExplorers/FLEXFileBrowserTableViewController.m

@@ -171,10 +171,10 @@
 {
     NSString *fullPath = nil;
     if (tableView == self.tableView) {
-        NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
+        NSString *subpath = self.childPaths[indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
-        fullPath = [self.searchPaths objectAtIndex:indexPath.row];
+        fullPath = self.searchPaths[indexPath.row];
     }
     
     NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:fullPath error:NULL];
@@ -221,10 +221,10 @@
     NSString *fullPath = nil;
     
     if (tableView == self.tableView) {
-        subpath = [self.childPaths objectAtIndex:indexPath.row];
+        subpath = self.childPaths[indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
-        fullPath = [self.searchPaths objectAtIndex:indexPath.row];
+        fullPath = self.searchPaths[indexPath.row];
         subpath = [fullPath lastPathComponent];
     }
     
@@ -313,11 +313,11 @@
 
     NSIndexPath *indexPath = [self.tableView indexPathForCell:sender];
     if (indexPath) {
-        NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
+        NSString *subpath = self.childPaths[indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
         indexPath = [self.searchController.searchResultsTableView indexPathForCell:sender];
-        fullPath = [self.searchPaths objectAtIndex:indexPath.row];
+        fullPath = self.searchPaths[indexPath.row];
     }
 
     self.fileOperationController = [[FLEXFileBrowserFileRenameOperationController alloc] initWithPath:fullPath];
@@ -331,11 +331,11 @@
 
     NSIndexPath *indexPath = [self.tableView indexPathForCell:sender];
     if (indexPath) {
-        NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
+        NSString *subpath = self.childPaths[indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
         indexPath = [self.searchController.searchResultsTableView indexPathForCell:sender];
-        fullPath = [self.searchPaths objectAtIndex:indexPath.row];
+        fullPath = self.searchPaths[indexPath.row];
     }
 
     self.fileOperationController = [[FLEXFileBrowserFileDeleteOperationController alloc] initWithPath:fullPath];

+ 3 - 3
Classes/GlobalStateExplorers/FLEXInstancesTableViewController.m

@@ -100,10 +100,10 @@
         cell.detailTextLabel.textColor = [UIColor grayColor];
     }
     
-    id instance = [self.instances objectAtIndex:indexPath.row];
+    id instance = self.instances[indexPath.row];
     NSString *title = nil;
     if ((NSInteger)[self.fieldNames count] > indexPath.row) {
-        title = [NSString stringWithFormat:@"%@ %@", NSStringFromClass(object_getClass(instance)), [self.fieldNames objectAtIndex:indexPath.row]];
+        title = [NSString stringWithFormat:@"%@ %@", NSStringFromClass(object_getClass(instance)), self.fieldNames[indexPath.row]];
     } else {
         title = [NSString stringWithFormat:@"%@ %p", NSStringFromClass(object_getClass(instance)), instance];
     }
@@ -118,7 +118,7 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    id instance = [self.instances objectAtIndex:indexPath.row];
+    id instance = self.instances[indexPath.row];
     FLEXObjectExplorerViewController *drillInViewController = [FLEXObjectExplorerFactory explorerViewControllerForObject:instance];
     [self.navigationController pushViewController:drillInViewController animated:YES];
 }

+ 6 - 6
Classes/GlobalStateExplorers/FLEXLiveObjectsTableViewController.m

@@ -100,11 +100,11 @@ static const NSInteger kFLEXLiveObjectsSortByCountIndex = 1;
     
     NSUInteger totalCount = 0;
     for (NSString *className in self.allClassNames) {
-        totalCount += [[self.instanceCountsForClassNames objectForKey:className] unsignedIntegerValue];
+        totalCount += [self.instanceCountsForClassNames[className] unsignedIntegerValue];
     }
     NSUInteger filteredCount = 0;
     for (NSString *className in self.filteredClassNames) {
-        filteredCount += [[self.instanceCountsForClassNames objectForKey:className] unsignedIntegerValue];
+        filteredCount += [self.instanceCountsForClassNames[className] unsignedIntegerValue];
     }
     
     if (filteredCount == totalCount) {
@@ -154,8 +154,8 @@ static const NSInteger kFLEXLiveObjectsSortByCountIndex = 1;
         self.filteredClassNames = [self.filteredClassNames sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
     } else if (self.searchBar.selectedScopeButtonIndex == kFLEXLiveObjectsSortByCountIndex) {
         self.filteredClassNames = [self.filteredClassNames sortedArrayUsingComparator:^NSComparisonResult(NSString *className1, NSString *className2) {
-            NSNumber *count1 = [self.instanceCountsForClassNames objectForKey:className1];
-            NSNumber *count2 = [self.instanceCountsForClassNames objectForKey:className2];
+            NSNumber *count1 = self.instanceCountsForClassNames[className1];
+            NSNumber *count2 = self.instanceCountsForClassNames[className2];
             // Reversed for descending counts.
             return [count2 compare:count1];
         }];
@@ -189,7 +189,7 @@ static const NSInteger kFLEXLiveObjectsSortByCountIndex = 1;
     }
     
     NSString *className = self.filteredClassNames[indexPath.row];
-    NSNumber *count = [self.instanceCountsForClassNames objectForKey:className];
+    NSNumber *count = self.instanceCountsForClassNames[className];
     cell.textLabel.text = [NSString stringWithFormat:@"%@ (%ld)", className, (long)[count integerValue]];
     
     return cell;
@@ -200,7 +200,7 @@ static const NSInteger kFLEXLiveObjectsSortByCountIndex = 1;
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    NSString *className = [self.filteredClassNames objectAtIndex:indexPath.row];
+    NSString *className = self.filteredClassNames[indexPath.row];
     FLEXInstancesTableViewController *instancesViewController = [FLEXInstancesTableViewController instancesTableViewControllerForClassName:className];
     [self.navigationController pushViewController:instancesViewController animated:YES];
 }

+ 6 - 6
Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogTableViewController.m

@@ -121,10 +121,10 @@
 {
     FLEXSystemLogTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kFLEXSystemLogTableViewCellIdentifier forIndexPath:indexPath];
     if (tableView == self.tableView) {
-        cell.logMessage = [self.logMessages objectAtIndex:indexPath.row];
+        cell.logMessage = self.logMessages[indexPath.row];
         cell.highlightedText = nil;
     } else if (tableView == self.searchController.searchResultsTableView) {
-        cell.logMessage = [self.filteredLogMessages objectAtIndex:indexPath.row];
+        cell.logMessage = self.filteredLogMessages[indexPath.row];
         cell.highlightedText = self.searchController.searchBar.text;
     }
     if (indexPath.row % 2 == 0) {
@@ -140,9 +140,9 @@
 {
     FLEXSystemLogMessage *logMessage = nil;
     if (tableView == self.tableView) {
-        logMessage = [self.logMessages objectAtIndex:indexPath.row];
+        logMessage = self.logMessages[indexPath.row];
     } else if (tableView == self.searchController.searchResultsTableView) {
-        logMessage = [self.filteredLogMessages objectAtIndex:indexPath.row];
+        logMessage = self.filteredLogMessages[indexPath.row];
     }
     return [FLEXSystemLogTableViewCell preferredHeightForLogMessage:logMessage inWidth:self.tableView.bounds.size.width];
 }
@@ -164,9 +164,9 @@
     if (action == @selector(copy:)) {
         FLEXSystemLogMessage *logMessage = nil;
         if (tableView == self.tableView) {
-            logMessage = [self.logMessages objectAtIndex:indexPath.row];
+            logMessage = self.logMessages[indexPath.row];
         } else if (tableView == self.searchController.searchResultsTableView) {
-            logMessage = [self.filteredLogMessages objectAtIndex:indexPath.row];
+            logMessage = self.filteredLogMessages[indexPath.row];
         }
 
         NSString *stringToCopy = [FLEXSystemLogTableViewCell displayedTextForLogMessage:logMessage] ?: @"";

+ 3 - 3
Classes/Network/FLEXNetworkHistoryTableViewController.m

@@ -222,7 +222,7 @@
     [self updateBytesReceived];
     [self updateFilteredBytesReceived];
 
-    FLEXNetworkTransaction *transaction = [notification.userInfo objectForKey:kFLEXNetworkRecorderUserInfoTransactionKey];
+    FLEXNetworkTransaction *transaction = notification.userInfo[kFLEXNetworkRecorderUserInfoTransactionKey];
     NSArray *tableViews = @[self.tableView];
     if (self.searchController.searchResultsTableView) {
         tableViews = [tableViews arrayByAddingObject:self.searchController.searchResultsTableView];
@@ -337,9 +337,9 @@
 {
     FLEXNetworkTransaction *transaction = nil;
     if (tableView == self.tableView) {
-        transaction = [self.networkTransactions objectAtIndex:indexPath.row];
+        transaction = self.networkTransactions[indexPath.row];
     } else if (tableView == self.searchController.searchResultsTableView) {
-        transaction = [self.filteredNetworkTransactions objectAtIndex:indexPath.row];
+        transaction = self.filteredNetworkTransactions[indexPath.row];
     }
     return transaction;
 }

+ 5 - 5
Classes/Network/FLEXNetworkRecorder.m

@@ -129,7 +129,7 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
     NSDate *responseDate = [NSDate date];
 
     dispatch_async(self.queue, ^{
-        FLEXNetworkTransaction *transaction = [self.networkTransactionsForRequestIdentifiers objectForKey:requestID];
+        FLEXNetworkTransaction *transaction = self.networkTransactionsForRequestIdentifiers[requestID];
         if (!transaction) {
             return;
         }
@@ -144,7 +144,7 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
 - (void)recordDataReceivedWithRequestID:(NSString *)requestID dataLength:(int64_t)dataLength
 {
     dispatch_async(self.queue, ^{
-        FLEXNetworkTransaction *transaction = [self.networkTransactionsForRequestIdentifiers objectForKey:requestID];
+        FLEXNetworkTransaction *transaction = self.networkTransactionsForRequestIdentifiers[requestID];
         if (!transaction) {
             return;
         }
@@ -159,7 +159,7 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
     NSDate *finishedDate = [NSDate date];
 
     dispatch_async(self.queue, ^{
-        FLEXNetworkTransaction *transaction = [self.networkTransactionsForRequestIdentifiers objectForKey:requestID];
+        FLEXNetworkTransaction *transaction = self.networkTransactionsForRequestIdentifiers[requestID];
         if (!transaction) {
             return;
         }
@@ -215,7 +215,7 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
 - (void)recordLoadingFailedWithRequestID:(NSString *)requestID error:(NSError *)error
 {
     dispatch_async(self.queue, ^{
-        FLEXNetworkTransaction *transaction = [self.networkTransactionsForRequestIdentifiers objectForKey:requestID];
+        FLEXNetworkTransaction *transaction = self.networkTransactionsForRequestIdentifiers[requestID];
         if (!transaction) {
             return;
         }
@@ -230,7 +230,7 @@ NSString *const kFLEXNetworkRecorderResponseCacheLimitDefaultsKey = @"com.flex.r
 - (void)recordMechanism:(NSString *)mechanism forRequestID:(NSString *)requestID
 {
     dispatch_async(self.queue, ^{
-        FLEXNetworkTransaction *transaction = [self.networkTransactionsForRequestIdentifiers objectForKey:requestID];
+        FLEXNetworkTransaction *transaction = self.networkTransactionsForRequestIdentifiers[requestID];
         if (!transaction) {
             return;
         }

+ 1 - 1
Classes/Network/FLEXNetworkSettingsTableViewController.m

@@ -92,7 +92,7 @@
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
 {
-    return [self.cells objectAtIndex:indexPath.row];
+    return self.cells[indexPath.row];
 }
 
 #pragma mark - UIActionSheetDelegate

+ 5 - 5
Classes/Network/FLEXNetworkTransactionDetailTableViewController.m

@@ -151,13 +151,13 @@ typedef UIViewController *(^FLEXNetworkDetailRowSelectionFuture)(void);
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 {
-    FLEXNetworkDetailSection *sectionModel = [self.sections objectAtIndex:section];
+    FLEXNetworkDetailSection *sectionModel = self.sections[section];
     return [sectionModel.rows count];
 }
 
 - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
 {
-    FLEXNetworkDetailSection *sectionModel = [self.sections objectAtIndex:section];
+    FLEXNetworkDetailSection *sectionModel = self.sections[section];
     return sectionModel.title;
 }
 
@@ -200,8 +200,8 @@ typedef UIViewController *(^FLEXNetworkDetailRowSelectionFuture)(void);
 
 - (FLEXNetworkDetailRow *)rowModelAtIndexPath:(NSIndexPath *)indexPath
 {
-    FLEXNetworkDetailSection *sectionModel = [self.sections objectAtIndex:indexPath.section];
-    return [sectionModel.rows objectAtIndex:indexPath.row];
+    FLEXNetworkDetailSection *sectionModel = self.sections[indexPath.section];
+    return sectionModel.rows[indexPath.row];
 }
 
 #pragma mark - Cell Copying
@@ -432,7 +432,7 @@ typedef UIViewController *(^FLEXNetworkDetailRowSelectionFuture)(void);
     NSMutableArray *rows = [NSMutableArray arrayWithCapacity:[dictionary count]];
     NSArray *sortedKeys = [[dictionary allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
     for (NSString *key in sortedKeys) {
-        NSString *value = [dictionary objectForKey:key];
+        NSString *value = dictionary[key];
         FLEXNetworkDetailRow *row = [[FLEXNetworkDetailRow alloc] init];
         row.title = key;
         row.detailText = [value description];

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

@@ -903,7 +903,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
 
 - (FLEXInternalRequestState *)requestStateForRequestID:(NSString *)requestID
 {
-    FLEXInternalRequestState *requestState = [self.requestStatesForRequestIDs objectForKey:requestID];
+    FLEXInternalRequestState *requestState = self.requestStatesForRequestIDs[requestID];
     if (!requestState) {
         requestState = [[FLEXInternalRequestState alloc] init];
         [self.requestStatesForRequestIDs setObject:requestState forKey:requestID];

+ 1 - 1
Classes/ObjectExplorers/FLEXArrayExplorerViewController.m

@@ -72,7 +72,7 @@
 - (id)detailObjectForRowCookie:(id)rowCookie
 {
     NSUInteger index = [rowCookie unsignedIntegerValue];
-    return [self.array objectAtIndex:index];
+    return self.array[index];
 }
 
 @end

+ 2 - 2
Classes/ObjectExplorers/FLEXDictionaryExplorerViewController.m

@@ -43,7 +43,7 @@
 
 - (NSString *)customSectionSubtitleForRowCookie:(id)rowCookie
 {
-    return [FLEXRuntimeUtility descriptionForIvarOrPropertyValue:[self.dictionary objectForKey:rowCookie]];
+    return [FLEXRuntimeUtility descriptionForIvarOrPropertyValue:self.dictionary[rowCookie]];
 }
 
 - (BOOL)customSectionCanDrillIntoRowWithCookie:(id)rowCookie
@@ -53,7 +53,7 @@
 
 - (UIViewController *)customSectionDrillInViewControllerForRowCookie:(id)rowCookie
 {
-    return [FLEXObjectExplorerFactory explorerViewControllerForObject:[self.dictionary objectForKey:rowCookie]];
+    return [FLEXObjectExplorerFactory explorerViewControllerForObject:self.dictionary[rowCookie]];
 }
 
 - (BOOL)shouldShowDescription

+ 1 - 1
Classes/ObjectExplorers/FLEXObjectExplorerFactory.m

@@ -50,7 +50,7 @@
         for (NSString *objectTypeString in explorerSubclassesForObjectTypeStrings) {
             Class objectClass = NSClassFromString(objectTypeString);
             if ([object isKindOfClass:objectClass]) {
-                explorerClass = [explorerSubclassesForObjectTypeStrings objectForKey:objectTypeString];
+                explorerClass = explorerSubclassesForObjectTypeStrings[objectTypeString];
                 break;
             }
         }

+ 15 - 15
Classes/ObjectExplorers/FLEXObjectExplorerViewController.m

@@ -273,7 +273,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
 
 - (NSString *)titleForPropertyAtIndex:(NSInteger)index
 {
-    FLEXPropertyBox *propertyBox = [self.filteredProperties objectAtIndex:index];
+    FLEXPropertyBox *propertyBox = self.filteredProperties[index];
     return [FLEXRuntimeUtility prettyNameForProperty:propertyBox.property];
 }
 
@@ -281,7 +281,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
 {
     id value = nil;
     if ([self canHaveInstanceState]) {
-        FLEXPropertyBox *propertyBox = [self.filteredProperties objectAtIndex:index];
+        FLEXPropertyBox *propertyBox = self.filteredProperties[index];
         value = [FLEXRuntimeUtility valueForProperty:propertyBox.property onObject:self.object];
     }
     return value;
@@ -352,7 +352,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
 
 - (NSString *)titleForIvarAtIndex:(NSInteger)index
 {
-    FLEXIvarBox *ivarBox = [self.filteredIvars objectAtIndex:index];
+    FLEXIvarBox *ivarBox = self.filteredIvars[index];
     return [FLEXRuntimeUtility prettyNameForIvar:ivarBox.ivar];
 }
 
@@ -360,7 +360,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
 {
     id value = nil;
     if ([self canHaveInstanceState]) {
-        FLEXIvarBox *ivarBox = [self.filteredIvars objectAtIndex:index];
+        FLEXIvarBox *ivarBox = self.filteredIvars[index];
         value = [FLEXRuntimeUtility valueForIvar:ivarBox.ivar onObject:self.object];
     }
     return value;
@@ -451,13 +451,13 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
 
 - (NSString *)titleForMethodAtIndex:(NSInteger)index
 {
-    FLEXMethodBox *methodBox = [self.filteredMethods objectAtIndex:index];
+    FLEXMethodBox *methodBox = self.filteredMethods[index];
     return [FLEXRuntimeUtility prettyNameForMethod:methodBox.method isClassMethod:NO];
 }
 
 - (NSString *)titleForClassMethodAtIndex:(NSInteger)index
 {
-    FLEXMethodBox *classMethodBox = [self.filteredClassMethods objectAtIndex:index];
+    FLEXMethodBox *classMethodBox = self.filteredClassMethods[index];
     return [FLEXRuntimeUtility prettyNameForMethod:classMethodBox.method isClassMethod:YES];
 }
 
@@ -612,7 +612,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
             break;
             
         case FLEXObjectExplorerSectionSuperclasses:
-            title = NSStringFromClass([self.filteredSuperclasses objectAtIndex:row]);
+            title = NSStringFromClass(self.filteredSuperclasses[row]);
             break;
             
         case FLEXObjectExplorerSectionReferencingInstances:
@@ -669,7 +669,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
             
         case FLEXObjectExplorerSectionProperties: {
             if ([self canHaveInstanceState]) {
-                FLEXPropertyBox *propertyBox = [self.filteredProperties objectAtIndex:row];
+                FLEXPropertyBox *propertyBox = self.filteredProperties[row];
                 objc_property_t property = propertyBox.property;
                 id currentValue = [self valueForPropertyAtIndex:row];
                 BOOL canEdit = [FLEXPropertyEditorViewController canEditProperty:property currentValue:currentValue];
@@ -680,7 +680,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
             
         case FLEXObjectExplorerSectionIvars: {
             if ([self canHaveInstanceState]) {
-                FLEXIvarBox *ivarBox = [self.filteredIvars objectAtIndex:row];
+                FLEXIvarBox *ivarBox = self.filteredIvars[row];
                 Ivar ivar = ivarBox.ivar;
                 id currentValue = [self valueForIvarAtIndex:row];
                 BOOL canEdit = [FLEXIvarEditorViewController canEditIvar:ivar currentValue:currentValue];
@@ -790,7 +790,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
             break;
             
         case FLEXObjectExplorerSectionProperties: {
-            FLEXPropertyBox *propertyBox = [self.filteredProperties objectAtIndex:row];
+            FLEXPropertyBox *propertyBox = self.filteredProperties[row];
             objc_property_t property = propertyBox.property;
             id currentValue = [self valueForPropertyAtIndex:row];
             if ([FLEXPropertyEditorViewController canEditProperty:property currentValue:currentValue]) {
@@ -801,7 +801,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
         } break;
             
         case FLEXObjectExplorerSectionIvars: {
-            FLEXIvarBox *ivarBox = [self.filteredIvars objectAtIndex:row];
+            FLEXIvarBox *ivarBox = self.filteredIvars[row];
             Ivar ivar = ivarBox.ivar;
             id currentValue = [self valueForIvarAtIndex:row];
             if ([FLEXIvarEditorViewController canEditIvar:ivar currentValue:currentValue]) {
@@ -812,19 +812,19 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
         } break;
             
         case FLEXObjectExplorerSectionMethods: {
-            FLEXMethodBox *methodBox = [self.filteredMethods objectAtIndex:row];
+            FLEXMethodBox *methodBox = self.filteredMethods[row];
             Method method = methodBox.method;
             viewController = [[FLEXMethodCallingViewController alloc] initWithTarget:self.object method:method];
         } break;
             
         case FLEXObjectExplorerSectionClassMethods: {
-            FLEXMethodBox *methodBox = [self.filteredClassMethods objectAtIndex:row];
+            FLEXMethodBox *methodBox = self.filteredClassMethods[row];
             Method method = methodBox.method;
             viewController = [[FLEXMethodCallingViewController alloc] initWithTarget:[self.object class] method:method];
         } break;
             
         case FLEXObjectExplorerSectionSuperclasses: {
-            Class superclass = [self.filteredSuperclasses objectAtIndex:row];
+            Class superclass = self.filteredSuperclasses[row];
             viewController = [FLEXObjectExplorerFactory explorerViewControllerForObject:superclass];
         } break;
             
@@ -972,7 +972,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
     if ([self.filterText length] > 0) {
         filteredIndexSet = [filteredIndexSet indexesPassingTest:^BOOL(NSUInteger index, BOOL *stop) {
             BOOL matches = NO;
-            NSString *rowTitle = [self customSectionTitleForRowCookie:[self.cachedCustomSectionRowCookies objectAtIndex:index]];
+            NSString *rowTitle = [self customSectionTitleForRowCookie:self.cachedCustomSectionRowCookies[index]];
             if ([rowTitle rangeOfString:self.filterText options:NSCaseInsensitiveSearch].location != NSNotFound) {
                 matches = YES;
             }

+ 5 - 5
Classes/Utility/FLEXKeyboardShortcutManager.m

@@ -64,8 +64,8 @@
                                    @" " : @"␠"};
     
     NSString *prettyKey = nil;
-    if (self.key && [keyMappings objectForKey:self.key]) {
-        prettyKey = [keyMappings objectForKey:self.key];
+    if (self.key && keyMappings[self.key]) {
+        prettyKey = keyMappings[self.key];
     } else {
         prettyKey = [self.key uppercaseString];
     }
@@ -207,16 +207,16 @@
         } else {
             FLEXKeyInput *exactMatch = [FLEXKeyInput keyInputForKey:unmodifiedInput flags:flags];
             
-            dispatch_block_t actionBlock = [self.actionsForKeyInputs objectForKey:exactMatch];
+            dispatch_block_t actionBlock = self.actionsForKeyInputs[exactMatch];
             
             if (!actionBlock) {
                 FLEXKeyInput *shiftMatch = [FLEXKeyInput keyInputForKey:modifiedInput flags:flags&(!UIKeyModifierShift)];
-                actionBlock = [self.actionsForKeyInputs objectForKey:shiftMatch];
+                actionBlock = self.actionsForKeyInputs[shiftMatch];
             }
             
             if (!actionBlock) {
                 FLEXKeyInput *capitalMatch = [FLEXKeyInput keyInputForKey:[unmodifiedInput uppercaseString] flags:flags];
-                actionBlock = [self.actionsForKeyInputs objectForKey:capitalMatch];
+                actionBlock = self.actionsForKeyInputs[capitalMatch];
             }
             
             if (actionBlock) {

+ 10 - 10
Classes/Utility/FLEXRuntimeUtility.m

@@ -49,7 +49,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
 + (NSString *)typeEncodingForProperty:(objc_property_t)property
 {
     NSDictionary *attributesDictionary = [self attributesDictionaryForProperty:property];
-    return [attributesDictionary objectForKey:kFLEXUtilityAttributeTypeEncoding];
+    return attributesDictionary[kFLEXUtilityAttributeTypeEncoding];
 }
 
 + (BOOL)isReadonlyProperty:(objc_property_t)property
@@ -77,33 +77,33 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
     NSMutableArray *attributesStrings = [NSMutableArray array];
     
     // Atomicity
-    if ([attributesDictionary objectForKey:kFLEXUtilityAttributeNonAtomic]) {
+    if (attributesDictionary[kFLEXUtilityAttributeNonAtomic]) {
         [attributesStrings addObject:@"nonatomic"];
     } else {
         [attributesStrings addObject:@"atomic"];
     }
     
     // Storage
-    if ([attributesDictionary objectForKey:kFLEXUtilityAttributeRetain]) {
+    if (attributesDictionary[kFLEXUtilityAttributeRetain]) {
         [attributesStrings addObject:@"strong"];
-    } else if ([attributesDictionary objectForKey:kFLEXUtilityAttributeCopy]) {
+    } else if (attributesDictionary[kFLEXUtilityAttributeCopy]) {
         [attributesStrings addObject:@"copy"];
-    } else if ([attributesDictionary objectForKey:kFLEXUtilityAttributeWeak]) {
+    } else if (attributesDictionary[kFLEXUtilityAttributeWeak]) {
         [attributesStrings addObject:@"weak"];
     } else {
         [attributesStrings addObject:@"assign"];
     }
     
     // Mutability
-    if ([attributesDictionary objectForKey:kFLEXUtilityAttributeReadOnly]) {
+    if (attributesDictionary[kFLEXUtilityAttributeReadOnly]) {
         [attributesStrings addObject:@"readonly"];
     } else {
         [attributesStrings addObject:@"readwrite"];
     }
     
     // Custom getter/setter
-    NSString *customGetter = [attributesDictionary objectForKey:kFLEXUtilityAttributeCustomGetter];
-    NSString *customSetter = [attributesDictionary objectForKey:kFLEXUtilityAttributeCustomSetter];
+    NSString *customGetter = attributesDictionary[kFLEXUtilityAttributeCustomGetter];
+    NSString *customSetter = attributesDictionary[kFLEXUtilityAttributeCustomSetter];
     if (customGetter) {
         [attributesStrings addObject:[NSString stringWithFormat:@"getter=%@", customGetter]];
     }
@@ -179,7 +179,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
             for (NSString *attributeName in [attributePairs allKeys]) {
                 objc_property_attribute_t attribute;
                 attribute.name = [attributeName UTF8String];
-                attribute.value = [[attributePairs objectForKey:attributeName] UTF8String];
+                attribute.value = [attributePairs[attributeName] UTF8String];
                 attributes[attributeIndex++] = attribute;
             }
             
@@ -316,7 +316,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
     NSUInteger numberOfArguments = [methodSignature numberOfArguments];
     for (NSUInteger argumentIndex = kFLEXNumberOfImplicitArgs; argumentIndex < numberOfArguments; argumentIndex++) {
         NSUInteger argumentsArrayIndex = argumentIndex - kFLEXNumberOfImplicitArgs;
-        id argumentObject = [arguments count] > argumentsArrayIndex ? [arguments objectAtIndex:argumentsArrayIndex] : nil;
+        id argumentObject = [arguments count] > argumentsArrayIndex ? arguments[argumentsArrayIndex] : nil;
         
         // NSNull in the arguments array can be passed as a placeholder to indicate nil. We only need to set the argument if it will be non-nil.
         if (argumentObject && ![argumentObject isKindOfClass:[NSNull class]]) {

+ 1 - 1
Classes/Utility/FLEXUtility.m

@@ -251,7 +251,7 @@
             id value = [[components lastObject] stringByRemovingPercentEncoding];
 
             // Handle multiple entries under the same key as an array
-            id existingEntry = [queryDictionary objectForKey:key];
+            id existingEntry = queryDictionary[key];
             if (existingEntry) {
                 if ([existingEntry isKindOfClass:[NSArray class]]) {
                     value = [existingEntry arrayByAddingObject:value];

+ 3 - 3
Classes/ViewHierarchy/FLEXHierarchyTableViewController.m

@@ -162,7 +162,7 @@ static const NSInteger kFLEXHierarchyScopeFullHierarchyIndex = 1;
         cell = [[FLEXHierarchyTableViewCell alloc] initWithReuseIdentifier:CellIdentifier];
     }
     
-    UIView *view = [self.displayedViews objectAtIndex:indexPath.row];
+    UIView *view = self.displayedViews[indexPath.row];
     NSNumber *depth = [self.depthsForViews objectForKey:[NSValue valueWithNonretainedObject:view]];
     UIColor *viewColor = [FLEXUtility consistentRandomColorForObject:view];
     cell.textLabel.text = [FLEXUtility descriptionForView:view includingFrame:NO];
@@ -182,13 +182,13 @@ static const NSInteger kFLEXHierarchyScopeFullHierarchyIndex = 1;
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    self.selectedView = [self.displayedViews objectAtIndex:indexPath.row];
+    self.selectedView = self.displayedViews[indexPath.row];
     [self.delegate hierarchyViewController:self didFinishWithSelectedView:self.selectedView];
 }
 
 - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
 {
-    UIView *drillInView = [self.displayedViews objectAtIndex:indexPath.row];
+    UIView *drillInView = self.displayedViews[indexPath.row];
     FLEXObjectExplorerViewController *viewExplorer = [FLEXObjectExplorerFactory explorerViewControllerForObject:drillInView];
     [self.navigationController pushViewController:viewExplorer animated:YES];
 }

+ 2 - 2
Example/UICatalog/AAPLTextViewController.m

@@ -107,8 +107,8 @@
     NSTimeInterval animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
     
     // Convert the keyboard frame from screen to view coordinates.
-    CGRect keyboardScreenEndFrame = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
-    CGRect keyboardScreenBeginFrame = [[userInfo objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue];
+    CGRect keyboardScreenEndFrame = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
+    CGRect keyboardScreenBeginFrame = [userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue];
 
     CGRect keyboardViewEndFrame = [self.view convertRect:keyboardScreenEndFrame fromView:self.view.window];
     CGRect keyboardViewBeginFrame = [self.view convertRect:keyboardScreenBeginFrame fromView:self.view.window];