Grayscale image view

      No Comments on Grayscale image view

Creating a grayscale image is not a problem in iOS, but I wanted to be able to animate an image view from grayscale to full color.

It turned out to be a pretty simple operation, all you have to do is create a grayscale image, and fade-in the original image. Kind of a hack, I know, but it does the job 🙂 So if you start with this image:


By increasing saturation to around 50% you would get something like this:


And finally you would get this:


When we leave out the boilerplate code this is all you need:

Pretty simple. If you want to play around with this code, or use it in your own projects, feel free to download it from github: DAGrayscaleImage

Have a nice day 🙂


Leave a Reply