Reputation: 111
I'm programming an App for the Apple Watch and I have to display certain content differently for the 38mm and 42mm version.
With UIDevice.currentDevice().model
you can get the model of the iphone (eventhough it only Displays "iPhone Simulator" in Xcode, but you get the idea).
Is there a way to get the model of the Apple Watch, so 38mm or 42mm, with a similar function?
Upvotes: 2
Views: 824
Reputation: 111
I found the answer! If you are interested:
WKInterfaceDevice.currentDevice().screenBounds.size
will give you (136.0,170.0)
for the 38mm version of Apple Watch and (156.0,195.0)
for the 42mm version of Apple Watch. With this information you can distinguish between these devices.
Upvotes: 8