In this video tutorial, we’ll look at how to separate your code for particular devices (Apple TV, iPad and iPhone). We’ll do this with #if os statements as well as simple if statements using UIDevice.current.userInterfaceIdiom . We’ll also talk about tying in locations to frame width and height of a device. And how you can use the nativeBounds property to see if the device is a specific size (for example to check if it’s an iPad Pro).
Don’t forget you can watch this course on our new CartoonSmart TV app available for iOS and tvOS.
Tags: xcode, tips, Xcode 9, workflow, testing device, userInterfaceIdiom, nativeBounds, UIDevice, #if, #endif