-
-
Save etolstoy/4cd17bdfc6e1e1b34ed1 to your computer and use it in GitHub Desktop.
Typhoon-Initial-Assemblies-Collector
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
@implementation RamblerAppDelegate | |
- (NSArray *)initialAssemblies { | |
return @[[MyAssembly class]]; | |
} | |
@end |
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
objc_getClassList(classes, numClasses); |
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
for (int i = 0; i < numClasses; i++) { | |
Class nextClass = classes[i]; | |
// Все Assembly, которые нужно активировать, должны реализовывать протокол RamblerInitialAssembly | |
if (class_conformsToProtocol(nextClass, @protocol(RamblerInitialAssembly))) { | |
[resultClasses addObject:nextClass]; | |
} | |
} |
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
@interface PostToolbarAssembly : TyphoonAssembly <InitialAssembly> | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment