Hello I want to add a UIView
on top of my current view controller. So I did like this.
- (void)viewDidLayoutSubviews
{
UIView *vwOverlay=[[UIView alloc] initWithFrame:self.view.frame];
[vwOverlay setBackgroundColor:[UIColor blackColor]];
[vwOverlay setAlpha:0.5];
[self.view addSubview:vwOverlay];
}
but this is adding top of my view but behind my navigation bar.Istill can clearly see navigation bar title and navigation menu items and also can click navigation bar items. But I want to cover this navigation bar too from my new view. How can I do this? Please help me. Thanks