This was inspired by a Stack Overflow question about getting all the classes of an application a Stack Overflow question about getting all the classes of an application and I took it a little too seriously (or perhaps not seriously enough).
This was inspired by a Stack Overflow question about getting all the classes of an application and I took it a little too seriously (or perhaps not seriously enough).
This was inspired by a Stack Overflow question about getting all the classes of an application and I took it a little too seriously (or perhaps not seriously enough).
Objective-C Method for Finding All Classesfinding all classes
This was inspired by a StackOverflowStack Overflow question about getting all the classes of an application and I took it a little too seriously (or perhaps not seriously enough).
It's rather silly to do it this way, but I believe the code below is guaranteed to find every class exposed in the scope it is called from...eventually. (As long as the class name is 255 chars or less.)
// I put this code in -application:didFinishLaunchingWithOptions:
application:didFinishLaunchingWithOptions
// Enumerator.m
Enumerator.m
Output:Output:
2015年10月05日 03:07:38.572 ClassFinder[59704:4595935] Here we go!
2015年10月05日 03:09:29.770 ClassFinder[59704:4595935] Found one! NSSet
2015年10月05日 03:09:29.774 ClassFinder[59704:4595935] Found one! NSURL
2015年10月05日 03:10:27.769 ClassFinder[59704:4595935] Found one! UINib
2015年10月05日 03:26:32.810 ClassFinder[59704:4595935] Found one! ALCity
2015年10月05日 03:07:38.572 ClassFinder[59704:4595935] Here we go! 2015年10月05日 03:09:29.770 ClassFinder[59704:4595935] Found one! NSSet 2015年10月05日 03:09:29.774 ClassFinder[59704:4595935] Found one! NSURL 2015年10月05日 03:10:27.769 ClassFinder[59704:4595935] Found one! UINib 2015年10月05日 03:26:32.810 ClassFinder[59704:4595935] Found one! ALCity
It's now 3:29AM, and it'sit has made it all the way to the string AcAeZP
🎉.
Objective-C Method for Finding All Classes
This was inspired by a StackOverflow question about getting all the classes of an application and I took it a little too seriously (or perhaps not seriously enough).
It's rather silly to do it this way, but I believe the code below is guaranteed to find every class exposed in the scope it is called from...eventually. (As long as the class name is 255 chars or less)
// I put this code in -application:didFinishLaunchingWithOptions:
// Enumerator.m
Output:
2015年10月05日 03:07:38.572 ClassFinder[59704:4595935] Here we go!
2015年10月05日 03:09:29.770 ClassFinder[59704:4595935] Found one! NSSet
2015年10月05日 03:09:29.774 ClassFinder[59704:4595935] Found one! NSURL
2015年10月05日 03:10:27.769 ClassFinder[59704:4595935] Found one! UINib
2015年10月05日 03:26:32.810 ClassFinder[59704:4595935] Found one! ALCity
It's now 3:29AM, and it's made it all the way to the string AcAeZP
🎉
Method for finding all classes
This was inspired by a Stack Overflow question about getting all the classes of an application and I took it a little too seriously (or perhaps not seriously enough).
It's rather silly to do it this way, but I believe the code below is guaranteed to find every class exposed in the scope it is called from...eventually. (As long as the class name is 255 chars or less.)
application:didFinishLaunchingWithOptions
Enumerator.m
Output:
2015年10月05日 03:07:38.572 ClassFinder[59704:4595935] Here we go! 2015年10月05日 03:09:29.770 ClassFinder[59704:4595935] Found one! NSSet 2015年10月05日 03:09:29.774 ClassFinder[59704:4595935] Found one! NSURL 2015年10月05日 03:10:27.769 ClassFinder[59704:4595935] Found one! UINib 2015年10月05日 03:26:32.810 ClassFinder[59704:4595935] Found one! ALCity
It's now 3:29AM and it has made it all the way to the string AcAeZP
.