O'Reilly logo

iOS Programming Cookbook by Hossam Ghareeb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using filters with CoreImage

You may have the Instagram app in your device or will at least have come across a few photo editing apps and edited some photos by applying filters to enhance or change the look of your photo. Nowadays, photo editing apps are invading the App Store with unique and funny filters that you can use. In this section, we will see how to deal with the CoreImage framework to apply built-in filters to photos.

How to do it...

To apply built-in filters to photos, perform the following steps:

  1. Create a new Xcode project with the Single View Application template and name it ImageFilters.
  2. Add UIImageView with the following constraints and set any image of your choice:
     ImageView.leading = Superview.leading ImageView.trailing = Superview.trailing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required