You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// // FLEXDictionaryExplorerViewController.m // Flipboard // // Created by Ryan Olson on 5/16/14. // Copyright (c) 2014 Flipboard. All rights reserved. //
#import "FLEXDictionaryExplorerViewController.h" #import "FLEXRuntimeUtility.h" #import "FLEXObjectExplorerFactory.h"
@interface FLEXDictionaryExplorerViewController ()
@property (nonatomic, readonly) NSDictionary *dictionary;
@end
@implementation FLEXDictionaryExplorerViewController
- (NSDictionary *)dictionary { return [self.object isKindOfClass:[NSDictionary class]] ? self.object : nil; }
#pragma mark - Superclass Overrides
- (NSString *)customSectionTitle { return @"Dictionary Objects"; }
- (NSArray *)customSectionRowCookies { return self.dictionary.allKeys; }
- (NSString *)customSectionTitleForRowCookie:(id)rowCookie { return [FLEXRuntimeUtility descriptionForIvarOrPropertyValue:rowCookie]; }
- (NSString *)customSectionSubtitleForRowCookie:(id)rowCookie { return [FLEXRuntimeUtility descriptionForIvarOrPropertyValue:self.dictionary[rowCookie]]; }
- (UIViewController *)customSectionDrillInViewControllerForRowCookie:(id)rowCookie { return [FLEXObjectExplorerFactory explorerViewControllerForObject:self.dictionary[rowCookie]]; }
- (BOOL)shouldShowDescription { return NO; }
@end
|