Detect current device with UI_USER_INTERFACE_IDIOM() in Swift

What is the equivalent of UI_USER_INTERFACE_IDIOM() in Swift to detect between iPhone and iPad?

I get an Use of unresolved identifier error when compiling in Swift.

18 Answers
18

Leave a Comment