The O.G. Virtual learning! Buy one, get 2 more Lifetime Memberships! - Click Here!

5 Minute Workflow Tips for Xcode #4

Which Device and What Size

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

 




Know what an affiliate program is? You make money just by sharing links to our site! Win. Win.

Earn when you refer any buyer here! 30 day tracking. Commissions are 33%-50% and recur on subscription products!


Uh oh, missing your affiliate ID. Create one real quick