Search code examples
iosbackgroundnoise

iOS: Add noise to backgrounds at runtime


A common styling trick to provide for more organic-looking surfaces (or to make gradients smoother) is to add noise, like in the right picture below:

Plain Added noise

A good example of noise applied in iOS interfaces can be seen here: http://dribbble.com/system/users/1164/screenshots/173316/tp_chatview.png?1309741355

My question: Is there a runtime way to add noise to images in iOS (i.e. not using pre generated noise tiles)?


Solution

  • I'd recommend taking a look at this image filter project. https://github.com/samuelsoe/ios-image-filters

    Here's the exact commit where noise filters were added. Should point you in the right direction.

    https://github.com/samuelsoe/ios-image-filters/commit/13c40fce523a2ea6dcefdd3e9aa247aa4a1042ca