Skip to content

Instantly share code, notes, and snippets.

@leoschweizer
Created January 16, 2016 12:50
Show Gist options
  • Save leoschweizer/13d204773c3c65cf9f06 to your computer and use it in GitHub Desktop.
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
#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