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 Tutorials > Tutorial Requests

Reply
 
LinkBack Thread Tools Display Modes
Old 08-23-2010, 08:49 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 2
EviluS is on a distinguished road
Default Navigation

Hi I was trying to make the following thig but ...
I have 3 UIViewController subclasses named First, Second and Third and I was trying to make that: From First to go to Second then to Third and from Third to back to First but with no success.

I'm using this:
Code:
- (IBAction) goToSecond: (id) sender {
	self.second = [[[Second alloc] initWithNibName:@"Second" bundle:nil] autorelease];
	self.second.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
	[self presentModalViewController:self.second animated:YES];
}
to go to other view and this
Code:
 - (IBAction) popSecond {
	[self dismissModalViewControllerAnimated:YES];
}
to back to previous but I don't know how to go back to other than previous in the stack?
Any help?

Best regards G.Petrov
EviluS is offline   Reply With Quote
Old 08-30-2010, 04:37 AM   #2 (permalink)
I will be a billionaire.
 
IphoneSdk's Avatar
 
Join Date: Sep 2009
Location: Scarborough, United Kingdom
Age: 17
Posts: 1,344
IphoneSdk is on a distinguished road
Default

Code:
[self dismissModalViewControllerAnimated:YES];
is telling it to go back so thats why when your on view 3 and you fire that method it goes back to view 2.

Instead you need to tell it to go to view 1 from view 3. So it is exactly the same as when you went from view 1 to view 2.

i.e
Code:
- (IBAction) goToSecond: (id) sender {
	self.second = [[[Second alloc] initWithNibName:@"Second" bundle:nil] autorelease];
	self.second.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
	[self presentModalViewController:self.second animated:YES];
}
but instead of everything saying second you want it to say first, or whatever you called the view.
__________________
iOS Apps | Website | Twitter | Facebook
IphoneSdk is offline   Reply With Quote
Reply

Bookmarks

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: 440
17 members and 423 guests
cgokey, dcool, Dj_kades, Droverson, givensur, iAppDeveloper, ipodphone, karatebasker, laureix68, LunarMoon, patapple, Paul Slocum, peterwilli, pipposanta, QuantumDoja, SLIC, Sloshmonster
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,696
Threads: 94,139
Posts: 402,961
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jasper_muc
Powered by vBadvanced CMPS v3.1.0

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