Skip to content

Instantly share code, notes, and snippets.

@anthonycastelli
Last active December 23, 2015 16:38
Show Gist options
  • Save anthonycastelli/6663001 to your computer and use it in GitHub Desktop.
Save anthonycastelli/6663001 to your computer and use it in GitHub Desktop.
Bright blurred UINavigationBar's in iOS 7
// Huge thanks to @stroughtonsmith for discovering this
CALayer *navBar = [CALayer layer];
[navBar setBackgroundColor:[UIColor blueColor] CGColor];
[navBar setFrame:CGRectMake(0, -20, 320, 64)]; // Navigation Bars are 44 points and the statusbar is 20 points
[navBar setOpacity:0.70];
[self.navigationController.navigationBar.layer insertSublayer:navBar atIndex:1];
@C4MS
Copy link

C4MS commented Mar 21, 2014

- (void)layoutSubviews {
     [self.layer insertSublayer:_navBar atIndex:1];
}

This will keep the layer always at the bottom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment