I added Google maps (I just inserted the code into the .m file), maps are reflected normally, but nothing else can be added, in particular, nav bar. It turned out that everything else is reflected under the map - how to fix it?

- (void)viewDidLoad { [super viewDidLoad]; UINavigationBar *navbar = [[UINavigationBar alloc]initWithFrame:CGRectMake(0, 0, 320, 50)]; //do something like background color, title, etc you self [self.view addSubview:navbar]; // Do any additional setup after loading the view. [GMSServices provideAPIKey: 
  • If you remove the map, is the navbar visible on the controller? - AlexThumb
  • @AlexThumb The fact of the matter is that Goshka Tarasov is seen
  • @Goshka Tarasov, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Nicolas Chabanovsky

1 answer 1

Look away:

 – insertSubview:atIndex: – insertSubview:aboveSubview: – insertSubview:belowSubview: – exchangeSubviewAtIndex:withSubviewAtIndex: 

This will insert the view in the correct place in the hierarchy.

Or add in the correct sequence.