Skip to content

Commit 7def09d

Browse files
committed
update README
1 parent 2defb52 commit 7def09d

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,21 @@ You can add whatever you want to the defaults.plist. Just use `objectForKey:` t
9595
Add the absolute path of bundle to AWLThemeManager object, then set the current theme that you want.
9696
For 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+
104106
Then 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

0 commit comments

Comments
 (0)