0

I don't want the status bar to disappear. I simply want the navigation bar to be 64px high instead of 44. Is this possible?

TIMEX
  • 259,804
  • 351
  • 777
  • 1,080

1 Answers1

0

This is the code I have used for adding blur view to both Status Bar and Navigation bar, I have given CGRect frame= CGRectMake(0, -20, 1000, 64); so as Blur View on Navigation Bar covers status bar too. For that I have given Y Co-Ordinate as -20. You can replace this Blur View with any uiview you want and thus cover your status bar with Navigation Bar. Also, I have given height of Navigation Bar as 64 as per your requirement.

CGRect bounds = self.navigationController.navigationBar.bounds;
UIVisualEffectView *visualEffectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
CGRect frame= CGRectMake(0, -20, 1000, 65);
visualEffectView.frame = frame;
visualEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.navigationController.navigationBar addSubview:visualEffectView];
self.navigationController.navigationBar.backgroundColor = [UIColor clearColor];
[self.navigationController.navigationBar sendSubviewToBack:visualEffectView];
Arpit Dongre
  • 1,683
  • 19
  • 30