Mask and crop an image

Masking an image enables a developer to create images with irregular shapes dynamically. Masking is often used to create a user interface that is more compelling and less boring.

Take for example the following example …



Following code is copy/paste into your “viewcontroller.h” file

Following Code copy/paste into “viewcontroller.m” file

  • Following method is use for the mask the image.
  • Following method is use for Cropping the image for a perticular size.
  • Calling the method of maskimage.

  • Calling the method of cropping the image.



Grab the source code here.

Leave a Reply

Your email address will not be published. Required fields are marked *