Created
January 16, 2016 12:50
-
-
Save leoschweizer/13d204773c3c65cf9f06 to your computer and use it in GitHub Desktop.
Finding the longest class name in your Objective-C runtime environment with Heliograph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <OpinionatedC/OpinionatedC.h> | |
#import <Heliograph/Heliograph.h> | |
NSArray *classes = [HGClassMirror allClasses]; | |
HGClassMirror *maxName = [classes max:^NSNumber *(HGClassMirror *each) { | |
return @(each.name.length); | |
}]; | |
NSLog(@"%@", [maxName name]); | |
// => ___UIDocumentPickerDocumentCollectionViewControllerAccessibility_super |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment