Search code examples
xcodeimageswiftuistoryboardphotoshop

how to remove white borders from an UIImageView


I have an application , where I drag a circular UIImageView on top of another UIImageView , and since a circle could never be squared , the white borders of the image must show , so I wonder if there is a way to remove those borders or to hide them (not by making them have the same color ).


Solution

  • I am expecting that you are looking for image masking feature. Have a look at this tutorial and this one too. Both of them uses CoreGraphics frame functions and are really quicker in response.

    Please note that it is not the Swift version but will give you atleast a starter.