evgenyneu / Cosmos

A star rating control for iOS/tvOS written in Swift
MIT License
2.18k stars 366 forks source link

add RTL to settings #159

Open abdallahnh opened 4 years ago

abdallahnh commented 4 years ago

Adding option in CosmosSettings to set RTL this is needed if you are switching languages and you don't need to close the app, so now from my app, I'm using a function isRTL() and set it to settings.isRTL and this fixed the weird behavior when I switch languages

evgenyneu commented 4 years ago

Thanks for the update.

and this fixed the weird behavior when I switch languages

What was the problem?

abdallahnh commented 4 years ago

Morning @evgenyneu when I switch from English to Arabic, the cosmo layer doesn't flip until I close the app and reopen it. This is due to the fact your library depends on RightToLeft helper that uses UIView.userInterfaceLayoutDirection and this don't change until app call didFinishLaunchingWithOptions

evgenyneu commented 4 years ago

Thanks for clarification. By "switch from English to Arabic" do you mean switching the language of the OS in the iPhone settings?

abdallahnh commented 4 years ago

@evgenyneu not the phone language the app language I'm doing it on the fly so I don't need the app to shutdown

evgenyneu commented 4 years ago

@abdallahnh, interesting, what kind of app is that? Usually apps show the same as the OS. But in your case, you want your app language to be different from that of the OS? Why?

abdallahnh commented 4 years ago

@evgenyneu TotersApp food delivery, we give the option to our clients to switch between (Arabic/English/Kurdish)

abdallahnh commented 1 year ago

@evgenyneu why we didn't merge this change? I would like to link back to the cosmos git I'm now using my own branch