iosiphoneuiview-hierarchy

How to addSubview to the bottom of view hierarchy


I want to add mapView, which I'm adding programatically, to the bottom of hierarchy view, as I already draw some of the elements beforehand, in the storyboard.

So, after i call method:

[self.view addSubview:self.map];

How do I put it on the bottom of the view hierarchy ?!


Solution

  • Just put it there directly instead.

    [self.view insertSubview:_map atIndex:0];