Add a RTL BuildSetting and use this for SwiftUI views too.

This commit is contained in:
Doug
2022-03-28 16:52:07 +01:00
parent ac7ab6eb5d
commit 8a82930814
3 changed files with 19 additions and 2 deletions
+5 -2
View File
@@ -394,8 +394,11 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
[NSBundle mxk_setLanguage:language];
[NSBundle mxk_setFallbackLanguage:@"en"];
[[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
[[UIView appearanceWhenContainedInInstancesOfClasses:@[UIAlertController.class]] setSemanticContentAttribute:UISemanticContentAttributeUnspecified];
if (BuildSettings.disableRightToLeftLayout)
{
[[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
[[UIView appearanceWhenContainedInInstancesOfClasses:@[UIAlertController.class]] setSemanticContentAttribute:UISemanticContentAttributeUnspecified];
}
// Set app info now as Mac (Designed for iPad) accesses it before didFinishLaunching is called
self.appInfo = AppInfo.current;