现在视图的本地化变得简单,每个 viewcontroller 只需在 viewDidLoad 中添加几行,或者创建父控制器
#import "UIViewController+LocalizeConstrint.h"
#import "UIView+viewRecursion.h"
在 viewDidLoad 中
//check if language is Arabic will loop for all view and flip constrain
if (GetAppLanguage() == UILanguageArabic) {
for (UIView *tempView in [self.view allSubViews]) {
[self changeViewRTL:tempView];
}
}
此图已过时,运行演示以查看更多内容。
pod 'iOS-Localize-Constrain' , '~> 0.0.8'