Why is the slider's minimumValueImage in iOS gets blurred?

199 Views Asked by At

I am using 24x24 point png images for this slider's minimumValueImage and maximumValueImage, But when I run them on iPhone simulator it appears but blurred/stretched. Can anyone help me how to resolve this issue.

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

There are three possible screen resolutions, so every image in your app needs to come in three versions. Here's how:

  1. Make three images in three sizes: in your case, that would be 24x24, 48x48, 72x72.

  2. Edit the asset catalog. Create an image set. Give the image set a name.

  3. Select the image set. You will see the Universal display with three slots for images:

    enter image description here

  4. Drag the small image into the 1x slot, the medium image into the 2x slot, and the big image into the 3x slot.

  5. In your code, refer to the image by the name of the image set.

Follow those instructions for every image in your app.