4

Images.xcassets in watchkit has options for 1x, 2x and 3x.

But how do we know which one to use ? Both are retina, but have different screen sizes. Do we have to supply all three? What happens if you don't ?

EDIT: I have tried putting the image in 1x and 2x, and haven't noticed any difference so far, but that could just be an absence of my testing. Nothing else.

Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190

2 Answers2

9

They are all @2x. You can configure your xcassets image set to actually be specific for the Apple Watch by specifying the device. Below is a screenshot demonstrating how to do this.

Apple Watch Image Set

Hopefully that helps clarify things.

cnoon
  • 16,575
  • 7
  • 58
  • 66
  • I'm a little confused. Should I be using the same image for 38mm and 42 mm then ? And again, why the three values if they are all 2x ? – Rahul Iyer Mar 27 '15 at 05:12
  • It has to do with the different Storyboard views. If you are going to use the same image on 38mm and 42mm, then just put your image in the `2x` slot. It will display in all Storyboard view options. If you have different images for each size, then obviously place them into the appropriate slot. Then put either the 38mm or 42mm image into the `2x` slot, whichever is your more common size you are supporting. – cnoon Mar 27 '15 at 05:23
  • You don't "have" to, you have the option to. Sometimes you may want the image to actually be a bit larger on the 42mm since you have more points available. – cnoon Mar 27 '15 at 15:17
  • That doesn't sound right to me, perhaps I've misunderstood - both the iPhone 4 and the iPhone 3GS have the same number of "points" available. The point of retina is that you have more pixels per point, which is why you have 2x. 3x makes sense if you have 3 times as many pixels per point. – Rahul Iyer Mar 28 '15 at 05:41
  • 1
    It's right in the [layout](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/WatchHumanInterfaceGuidelines/Layout.html) section of the HIG for the watch. Both screen sizes use `@2x` resolution. It's the same idea as the iPhone 4S vs. the iPhone 5. Both are `@2x` resolution, but the iPhone 5 has more vertical points available. – cnoon Mar 28 '15 at 20:28
1

It'll use the closest available match. But the Watch is retina native so ideally you would provide just @2x; bundling more will just take up unneeded space.

gregheo
  • 4,182
  • 2
  • 23
  • 22
  • Do you know if this is officially documented somewhere ? – Rahul Iyer Mar 27 '15 at 01:27
  • Check out the Apple Watch HIG: "Create all image assets as @2x resources. There is no need to create non-Retina images." [source](https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/WatchHumanInterfaceGuidelines/Images.html#//apple_ref/doc/uid/TP40014992-CH25-SW1) – gregheo Mar 28 '15 at 02:02
  • You source says that we should just use 2x. – Rahul Iyer Mar 28 '15 at 05:42
  • Right. But if you provide just 1x, you'll still see an image. That's what I said in my answer – ideally, you just provide just 2x. – gregheo Mar 29 '15 at 13:27
  • I use 2x because in my case, I never see images 3x on Watch App. Even if they're in the watch images set. – Markus Dec 11 '17 at 12:22