Does anyone know what Facebook uses for their blurred toolbar?
Now, I KNOW there are already countless threads about iOS 7 blur. They all come to these same solutions:
I've read at length in the Apple Dev Forums and it seems like this is a technical challenge even for Apple engineers. With Facebook nailing the real-time blur with something else than the two approaches I described. Any idea?
Apparently the trick here is to insert the translucent layer as a sublayer of the navigation bar. I take no credit for finding this, and the following snippet has been taken from this gist.
UIColor *barColour = [UIColor colorWithRed:0.13f green:0.14f blue:0.15f alpha:1.00f];
UIView *colourView = [[UIView alloc] initWithFrame:CGRectMake(0.f, -20.f, 320.f, 64.f)];
colourView.opaque = NO;
colourView.alpha = .7f;
colourView.backgroundColor = barColour;
self.navigationBar.barTintColor = barColour;
[self.navigationBar.layer insertSublayer:colourView.layer atIndex:1];