File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -95,18 +95,21 @@ You can add whatever you want to the defaults.plist. Just use `objectForKey:` t
9595Add the absolute path of bundle to AWLThemeManager object, then set the current theme that you want.
9696For example:
9797
98- NSString *bundlePath1 = [[NSBundle mainBundle] pathForResource:@"BaseSample" ofType:@"bundle"];
99- NSString *bundlePath2 = [[NSBundle mainBundle] pathForResource:@"Sample" ofType:@"bundle"];
100- AWLThemeManager *mgr = [[AWLThemeManager alloc] init];
101- [mgr addTheme:bundlePath1];
102- mgr.currentTheme = [mgr addTheme:bundlePath2];
103-
98+ ``` objc
99+ NSString *bundlePath1 = [[NSBundle mainBundle ] pathForResource: @"BaseSample" ofType:@"bundle"] ;
100+ NSString * bundlePath2 = [[ NSBundle mainBundle] pathForResource:@"Sample" ofType:@"bundle"] ;
101+ AWLThemeManager * mgr = [[ AWLThemeManager alloc] init] ;
102+ [ mgr addTheme: bundlePath1 ] ;
103+ mgr.currentTheme = [ mgr addTheme: bundlePath2 ] ;
104+ ```
105+
104106Then you can access the resource use the same AWLThemeManager object as follow.
105107
106- UIImage * img = [ mgr imageNamed:@"icon"] ;
107- titleLabel.textColor = [ mgr colorForKey:@"Content_Text_Color"] ;
108- titleLabel.font = [ mgr fontForKey:@"Content_Font"] ;
109-
108+ ```objc
109+ UIImage *img = [mgr imageNamed:@"icon"];
110+ titleLabel.textColor = [mgr colorForKey:@"Content_Text_Color"];
111+ titleLabel.font = [mgr fontForKey:@"Content_Font"];
112+ ```
110113
111114
112115
You can’t perform that action at this time.
0 commit comments