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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-10-2011, 09:51 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 4
maxmxmaxmx is on a distinguished road
Default problems with uinavigationcontroller

i have a problem with the navigationcontroller. i like to push and pop between 2 viewcontrollers. it starts with the first, pushes to the second, pops back an the next push is not working. so pushing from the 1. to the 2. again
Code:
- (void)pushFirstToSecond{
	[self.navController popViewControllerAnimated:NO];
	[self.navController pushViewController:[[AppViewController alloc] autorelease] animated:NO];
}
- (void)pushBackFromSecondToFirst{
        //setting up a new instance of the first view
	MainView *contentV = [[MainView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
	[contentV setImage:[UIImage imageNamed:@"background.png"]];
	[contentV loadVariables];
	MainViewController *mainControll = [[MainViewController alloc] init];
	[mainControll setView:contentV];
	[contentV setUserInteractionEnabled:YES];
	UIViewController *controll= mainControll;
	UIViewController *viewC = [self.navController topViewController];
	[self.navController popViewControllerAnimated:NO];
	[self.navController pushViewController:controll animated:NO];
        //dont know if i need to release the view of viewC
	//[viewC releaseView];
	[viewC release];
}
somehow its not working and it seems to be that the second viewcontroller is not released at the time i push it again
because if i dont stop the sounds of it i still hear it operate
i think it pushes back automatically because it still says pushBackFromSecondToFirst if its on the top of the stack.
but if i try to release the view its throwing exeptions.

could some one please help me out
thank you!
maxmxmaxmx is offline   Reply With Quote
Reply

Bookmarks

Tags
release, uinavigationcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 405
17 members and 388 guests
7twenty7, Alex-alex, Apptronics RBC, baja_yu, chiataytuday, dre, gwelmarten, ipodphone, jeroenkeij, jleannex55, matador1978, mbadegree, n00b, pbart, Retouchable, Sami Gh, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,125
Posts: 402,910
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:23 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0