Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Streamer

macrumors member
Original poster
I'm missing something obvious, but I have a tabBar type application which does what I want, except that on one the tab views, I have a button which will switch to another view except that when I execute the following line

Code:
[ self.view insertSubview:newView.view atIndex:0];

It does indeed show the new view except that it's superimposed over the original view and I can still select buttons on the old view as well as stuff on the new view.

Any quick thoughts?

Thanks
 
You first have to remove your existing view before inserting a new one...

You first have to remove your current view before inserting a new one...

Try putting the following line of code before the " insertSubview: atIndex: " line


Code:
 [<firstView>.view  removeFromSuperview];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.