I am working on a custom keyboard and if i include this code in my class the i got the error:
let isPad = UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad
Error - Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
I need this code because when user runs iPhone app (like instagram) on iPad, I need to load iPhone keyboard preset and use its geometry. I have try below code but it is not a solution:
if UI_USER_INTERFACE_IDIOM() == .Pad {
}
So please share if anyone have any solution.