Overlay UIView on UINavigationBar and UIViewController

Essentially, I want to display a notification only under the UINavigationController, covering the area that will occupy the top view of the UIViewController. However, I want the background image to expand upward and partially cover the UINavigationBar

The finished product, we hope, is as follows: alt text

The trick is that I want this to apply to certain views with a view hierarchy, so attacking a problem with the help [UIApplication keyWindow]might not be a good idea. Also, I suggest that using views outside the private UINavigationTransitionViewwill not be part of the transition animation to the view, leaving my view on top of the controller below when this one is unloaded.

, UINavigationBar, UINavigationBar

?

+5
1

, Navigation Bar, .

.... Custom back, .

enter image description here

UINavigationBar *bar = [self.navigationController navigationBar];   
UIButton *btn;
btn = [[UIButton alloc] initWithFrame:CGRectMake(5, 2, 100, 48)];
[btn setImage:[UIImage imageNamed:@"left.png"] forState:UIControlStateNormal];
btn.backgroundColor = [UIColor clearColor];
[bar addSubview:btn];
[btn release];

... enter image description here

+1

All Articles