You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.
I have an app where the user selects one of a set of regions for the app to run in and all the money amounts need to use the currency for that region. I can't work out how to have variables that can be set to any of the strongly typed currency types (e.g. AUD, NZD) since Swift disallows the use of runtime defined Generics types. If I use Money type and force it to a specific currency, its fine until I do any operations that generate a new Money object (such as adding two Money objects), which causes the new Money object to be set to local region instead of the forced region I was using.
I'm using the Swift 4 branch.
Any Ideas on how to do this?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have an app where the user selects one of a set of regions for the app to run in and all the money amounts need to use the currency for that region. I can't work out how to have variables that can be set to any of the strongly typed currency types (e.g. AUD, NZD) since Swift disallows the use of runtime defined Generics types. If I use Money type and force it to a specific currency, its fine until I do any operations that generate a new Money object (such as adding two Money objects), which causes the new Money object to be set to local region instead of the forced region I was using.
I'm using the Swift 4 branch.
Any Ideas on how to do this?
The text was updated successfully, but these errors were encountered: