O'Reilly logo

The Core iOS Developer’s Cookbook, Fifth Edition by Rich Wardwell, Erica Sadun

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

Frosted Glass Effect

An added flourish to the custom alert is a newly introduced visual effect found in iOS 7 and highlighted in the Control Center—the frosted glass appearance. Apple provides this effect by default in a number of UIKit elements: UITabBar, UINavigationBar, and UIToolbar.

Outside the embedded implementation in these bars, no mechanism is available to include this effect in your own views. Apple has provided sample code, a UIImage category, that simulates this effect. Unfortunately, it pales in comparison to the built-in implementation. The category is only a close approximation, and worse, is much slower than the embedded version, rendering it unusable as a live effect.

To work around this limitation, Recipe 3-4 subclasses a ...

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