Skip to content

Instantly share code, notes, and snippets.

@etolstoy
Last active November 15, 2015 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etolstoy/4cd17bdfc6e1e1b34ed1 to your computer and use it in GitHub Desktop.
Save etolstoy/4cd17bdfc6e1e1b34ed1 to your computer and use it in GitHub Desktop.
Typhoon-Initial-Assemblies-Collector
@implementation RamblerAppDelegate
- (NSArray *)initialAssemblies {
return @[[MyAssembly class]];
}
@end
objc_getClassList(classes, numClasses);
for (int i = 0; i < numClasses; i++) {
Class nextClass = classes[i];
// Все Assembly, которые нужно активировать, должны реализовывать протокол RamblerInitialAssembly
if (class_conformsToProtocol(nextClass, @protocol(RamblerInitialAssembly))) {
[resultClasses addObject:nextClass];
}
}
@interface PostToolbarAssembly : TyphoonAssembly <InitialAssembly>
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment