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

Add UILabel shortcut properties for text, font, and textColor.

Ryan Olson лет назад: 12
Родитель
Сommit
8ebfc929a4
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      Classes/Object Explorers/FLEXViewExplorerViewController.m

+ 7 - 1
Classes/Object Explorers/FLEXViewExplorerViewController.m

@@ -56,7 +56,13 @@ typedef NS_ENUM(NSUInteger, FLEXViewExplorerRow) {
 
 - (NSArray *)shortcutPropertyNames
 {
-    return @[@"frame", @"bounds", @"center", @"transform", @"backgroundColor", @"alpha", @"opaque", @"hidden", @"clipsToBounds", @"userInteractionEnabled"];
+    NSArray *propertyNames = @[@"frame", @"bounds", @"center", @"transform", @"backgroundColor", @"alpha", @"opaque", @"hidden", @"clipsToBounds", @"userInteractionEnabled"];
+    
+    if ([self.viewToExplore isKindOfClass:[UILabel class]]) {
+        propertyNames = [@[@"text", @"font", @"textColor"] arrayByAddingObjectsFromArray:propertyNames];
+    }
+    
+    return propertyNames;
 }
 
 - (NSString *)customSectionTitleForRowCookie:(id)rowCookie