Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

Graves Robber
($1.99)

African Adventure
($0.99)

iTazer
($0.99)

ArtStudio
($3.99)

Pigs Vs Wolves
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-17-2009, 05:17 PM   #5 (permalink)
mbarron
Registered Member
 
Join Date: Jun 2009
Posts: 27
Default

Quote:
Originally Posted by jsd View Post
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.
mbarron is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 23,539
Threads: 38,286
Posts: 168,254
Top Poster: smasher (2,533)
Welcome to our newest member, emusher
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:49 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.