1

This question is basically to study, there is no "why?" or "instead of ..."

In Swift 3 it is very common to use the .default, exemplifying:

 UIApplication.shared.statusBarStyle = .default // from UIStatusBarStyle.default 

And I was thinking, how? In my tests I did not succeed, I try something like:

 class Test { enum Options { case light, default // bad world } } 

Thank you :)

1 Answer 1

6

Do like this:

class Test { enum Options:Int { case `default` case lightContent } } 
Sign up to request clarification or add additional context in comments.

1 Comment

Welcome. If it helps you then please tick the accept button :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.