Skip to content
This repository was archived by the owner on Jul 2, 2018. It is now read-only.
This repository was archived by the owner on Jul 2, 2018. It is now read-only.

Using a variable for multiple currencies #90

@tplester

Description

@tplester

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions