I used Below code in ObjectiveC and worked but in swift giving error.
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) Help me to get its Swift version.
I used Below code in ObjectiveC and worked but in swift giving error.
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) Help me to get its Swift version.
let isPad = UI_USER_INTERFACE_IDIOM() == .Pad UI_USER_INTERFACE_IDIOM() is commented as to be used only if you deploy for very old versions of iOS. You might want to prefer UIDevice.currentDevice().userInterfaceIdiom instead.