0

I have a bunch of round Images. They are in png with a 512x512 size. I took them from Flaticon.

To display images in a tableView I use imageView with a 45x45px size and Content Mode as Aspect Fit. Images put in a project assets.xcassets folder with a Scale property as Single Scale.

When images displayed by a tableView a jaggy border is visible in every image:

And its visible without zooming in:

Is it a problem with source images? How to make the image border smooth?

artexhibit
  • 198
  • 3
  • 17

1 Answers1

1

The issue is with an image that you have added. Please use a normal image and give corner radius to image view as below

self.imageFlag.layer.cornerRadius = self.imageFlag.frame.size.height/2

This will resolve your issue Below is the screenshot enter image description here

Ritu pal
  • 306
  • 2
  • 11
  • Hi Ritu. Thank you for the reply! But what if I want to use already rounded image itself? Is it possible to scale it down without the jaggy border? – artexhibit Aug 09 '22 at 16:33
  • Hi @artexhibit, i have also used round image and it is working fine. You can use clipToBounds to image view – Ritu pal Aug 10 '22 at 04:22