修复多语言布局问题
This commit is contained in:
eggmanQQQ
2024-06-19 00:00:11 +08:00
parent daf1e2d2cd
commit 726a6d66f2
8 changed files with 119 additions and 107 deletions

View File

@@ -48,20 +48,14 @@
language = @"ar";
}
if ([language isEqualToString:@"ar"]) {
[UIView appearance].semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
[UISearchBar appearance].semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
} else {
[UIView appearance].semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
[UISearchBar appearance].semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
}
[NSBundle setLanguageText:language];
[[NSNotificationCenter defaultCenter]postNotificationName:@"kSwitchLanguage" object:language];
[[NSNotificationCenter defaultCenter] postNotificationName:@"kSwitchLanguage" object:language];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5* NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter]postNotificationName:@"kChanecNavView" object:language];