У меня есть расширение UIStoryboard, которое инициирует раскадровку на основе переданного типа / имени. Я использую + [UIStoryboard storyboardWithName: bundle:] для создания раскадровки, но кажется, что Objc не может найти селектор для него,
#define valueString(enum) [@[@"Main",@"Login"] objectAtIndex:enum]
@interface UIStoryboard (Utility)
typedef NS_ENUM(NSInteger, StoryboardType) {
StoryboardTypeMain,
StoryboardTypeLogin
};
- (instancetype) initWithType:(StoryboardType)type bundle: (NSBundle*)bundle;
- (instancetype) initWithType:(StoryboardType)type;
@implementation
- (instancetype)initWithType:(StoryboardType)type bundle:(NSBundle *)bundle {
self = [[self class] storyboardWithName:valueString(type) bundle:bundle];
return self;
}
- (instancetype)initWithType:(StoryboardType)type {
self = [[self class] storyboardWithName:valueString(type) bundle:nil];
return self;
}