Skip to main content

Day 54

About 2 minSwiftcrashcoursepaul-hudsonswifthacking-with-swiftxcodeappstore

Day 54 ๊ด€๋ จ


100 Days of Swift - Day 54

Project 13, part three

Project 13, part three

Isnโ€™t Core Image amazing? We only dabbled with a handful of effects, but even then it can do things in real-time that would take weeks if not months to code by hand. Even better, it automatically takes full advantage of the GPU and Metal, so youโ€™re guaranteed maximum performance even though we barely wrote any code.

I hope this has given you the taste for exploration. The challenges youโ€™ll be completing today focus on enhancing what you have, but I really do encourage you to look up the list of Core Image filters and try some of them out. Itโ€™s fun, youโ€™ll learn stuff, and youโ€™ll really embed your new Core Image knowledge deep inside your brain.

Nate Berkus, a famous American interior designer, once said โ€œyou will enrich your life immeasurably if you approach it with a sense of wonder and discovery, and always challenge yourself to try new things.โ€ Well, this is your chance: step out into the world of Core Image, allow yourself to be playful for a while, and see what you can create!

Today you should work through the wrap up chapter for project 13, complete its review, then work through all three of its challenges.

Wrap up

Wrap up
100 Days of Swift - Day 54 - Wrap up

Wrap up

This has been the briefest possible introduction to Core Image, yet we still managed to make something useful, using UISlider for the first time and even writing images to the photo album.

Unless you really do intend to make Yet Another Core Image Filters Program (best of luck!) your use of Core Image will mostly be about manipulating a picture in a very specific way, using a filter you have hand-crafted to look great.

If you want to try other filters, search on Google for "Core Image Filter Reference" and have a read โ€“ it will list the input keys for each of them so that you can get really fine-grained control over the filters.

Review what you learned

Anyone can sit through a tutorial, but it takes actual work to remember what was taught. Itโ€™s my job to make sure you take as much from these tutorials as possible, so Iโ€™ve prepared a short review to help you check your learning.

Click here to review what you learned in project 13.open in new window

Challenge

One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try your new knowledge to make sure you fully understand whatโ€™s going on:

  1. Try making the Save button show an error if there was no image in the image view.
  2. Make the Change Filter button change its title to show the name of the currently selected filter.
  3. Experiment with having more than one slider, to control each of the input keys you care about. For example, you might have one for radius and one for intensity.

Thatโ€™s another project finished, and one that should be able to make some really interesting and experimental images! This is a great point to share your progress with others.


์ด์ฐฌํฌ (MarkiiimarK)
Never Stop Learning.