iOSAppLanguageSwitchDemo/README.md

34 lines
823 B
Markdown
Raw Normal View History

2017-06-13 20:55:54 +08:00
# iOS应用内手动切换语言
2017-06-13 16:48:13 +08:00
iOS手动切换显示语言
2017-06-13 20:55:54 +08:00
基本API包括下面三个
#### NSBundle+AppLanguageSwitch.h
```objective-c
//设置语言
+ (void)setCusLanguage:(NSString *)language;
//获取语言
+ (NSString *)getCusLanguage;
//恢复成系统语言
+ (void)restoreSysLanguage;
```
通知key一个
```objective-c
//当app语言改变之后发送通知
NSString * const ZZAppLanguageDidChangeNotification;
```
2017-06-14 09:51:37 +08:00
## Support
2017-06-13 20:55:54 +08:00
| StoryBoard | Xib | NSLocalizedString |
|:--------------------:|:---------------------------:|:----------------------------:|
| √ | √ | √ |
2017-06-14 09:54:02 +08:00
2017-06-14 09:51:37 +08:00
##效果图
<p align="center" >
2017-06-14 09:54:02 +08:00
<img src="https://github.com/zengqingf/iOSAppLanguageSwitch/blob/master/screenshot/1.gif?raw=true" width="312" height="576">
2017-06-14 09:51:37 +08:00
</p>
2017-06-13 20:55:54 +08:00
更多用法请看demo觉得好用的话别忘star一下哦