Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-17-2009, 02:26 PM   #1 (permalink)
mbarron
Registered Member
 
Join Date: Jun 2009
Posts: 28
Default removing (or identifying) the default view

I'm having trouble removing the default view in a iPhone app. I started with a view based app and want to have button that simply changes to a settings page. I set up the main view with a button called "settings". I set up the settings view. I was able to hook the settings up to its own controller and then in the controller for the main page add this action. This works, but puts the new view behind the start view, so I can see the settings button on the settings page.

Quote:
-(IBAction) startSettings: (id)sender { SettingsViewController *settingsControllerview = [[SettingsViewController alloc] initWithNibName:@"Settings" bundle:nil]; [self.view insertSubview:settingsControllerview.view atIndex:0]; }
So I figured I just need to remove the first view. I thought this would work:

Quote:
[viewController.view removeFromSuperview];
Because that's how the delegate originally added it
Quote:
[window addSubview:viewController.view]; [window makeKeyAndVisible];
But no such luck. So I'm really confused. Obviously, I've got the wrong name for the existing view, but how do I discover what the correct name is?

Any guidance would be greatly appreciated, I've been tearing my hair out for three hours on this.
mbarron is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,670
Threads: 89,155
Posts: 380,385
Top Poster: BrianSlick (7,110)
Welcome to our newest member, chrislevis
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:30 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.