You can use this solution:
Create single .h file and multiple .m files for multiple targets.
- create .h file with Theme of your app
//h file
@interface AppTheme : NSObject
@property (nonatomic) UIColor *backgroundColor;
@property (nonatomic) UIColor *buttonTextColor;
//and so on.
//you can create classes or protocols for curtain elements of your app
//
@property (nonatomic) ButtonStyle *defaultButtonStyle;
@property (nonatomic) ButtonStyle *destroyButtonStyle;
//and so on where
// Button style has titleColor, titleFont, background and ect.
@end
- Now you can create .m file for target A
AppTheme+A.m where you can define your Theme like this:
@implementation
- (instancetype)init {
if (self = [super init]){
self.backgroundColor = [UIColor black];
self.buttonTextColor = [UIColor white];
//and so on
}
return self;
}
@end
for the target B you can create other file:
AppTheme+B.m where you can define your Theme like this:
@implementation
- (instancetype)init {
if (self = [super init]){
self.backgroundColor = [UIColor pinkColor];
self.buttonTextColor = [UIColor yellowColor];
//and so on
}
return self;
}
@end
- Then include your AppTheme+A.m in target A and AppTheme+B.m target B.