SBotirov
SBotirov

Reputation: 14128

Swift 4: How to use Foundation Locale struct if you have enum with name Locale

So, I have custom enum with name Locale:

public enum Locale: String {
    case ru
    case uz
}

I'm using it for api response json. If I want use Foundation Locale struct then xcode looks to just my local declared enum. How to I can use Foundation Locale struct if I have enum with same name?

Upvotes: 0

Views: 150

Answers (1)

Punit
Punit

Reputation: 1340

You can use Foundation.Locale to differentiate Foundation Locale and your local enum

Upvotes: 2

Related Questions