I have an application with two languages: Arabic & English. I would like to change UI direction after changing the language inside the app.
I use this code to do this:
UIView.appearance().semanticContentAttribute = isRTL ? .forceRightToLeft : .forceLeftToRight
This code is working well, I will get UI with the correct direction, but the app performance is going worse. I have some lagging while selecting tabs on my Tab View Controller.
Any ideas on how to fix it? (removing changing semanticContentAttribute fix this problem, but I have to use this code for supporting Arabic language)