Quote:
Originally Posted by jsd
You've got it in the wrong order - think about it... If you remove the view first, then inserting something into it later once it's already off the screen isn't going to work.
Add the second view, then remove the first.
|
Sorry, I know I'm being really dense here, but this still doesn't work. I understand what you're saying: when I remove the view first, I have nothing to put the view into. But if I move it last like this:
Code:
-(IBAction) startSettings:(id)sender {
SettingsViewController *settingsControllerview = [[SettingsViewController alloc] initWithNibName:@"Settings" bundle:nil];
[self.view insertSubview:settingsControllerview.view atIndex:0];
[self.view removeFromSuperview];
}
I'm just now removing the view that I just inserted my subview into. It seems like I either need a way to identify my previous subview (the part of self.view that I want to remove) or just create a whole new blank view and insert my new subview into it. But god help me if I've been able to figure it out. Again, I'd appreciate any help you can provide.