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

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

Draw This
($0.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-19-2009, 07:34 PM   #76 (permalink)
jamesbrannan
New User
 
jamesbrannan's Avatar
 
Join Date: Aug 2008
Location: Gaithersburg, MD
Posts: 178
jamesbrannan is on a distinguished road
Default

Sorry to keep "beating a dead horse" but warning newcomers, this is wayyyy outdated, it is so much easier now...

Quote:
Originally Posted by offcampus View Post
Got a questions to expand on the tut a bit:

Is there a way to stay within this framework, and create "flipHome" method that can be used generically for many different view controllers ... for example in the following code:

Code:
- (void)flipToHome:(id)sender{
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:1.0];
	[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:window cache:YES];
	[[goWebController view] removeFromSuperview];
	[window addSubview:[viewController view]];
	onFront = YES;
	[UIView commitAnimations];
	
}
This particular code works if I call it from my goWebController.m file.

However, if I want to use the same method from multiple view controllers, to just send me home to the main screen, can I change the line
Code:
[[goWebController view] removeFromSuperview];
to something like

Code:
[[sender view] removeFromSuperview];
^ I tried that specific code, but it didn't work. I am just trying to figure out all the guts of this and understand how all the pieces work together here, using the same calling method as was used in your tutorial when I click on a "back" button.

Thanks for any advice/tips/understanding you can offer!
jamesbrannan is offline   Reply With Quote
 

» Advertisements
» Online Users: 574
16 members and 558 guests
alainewy75, Bryan1, Domele, Dump3, fgreg2692han, Hamad, HowEver, iAppDev, ITCreative, mavisww22, msovani, nt.hai, Rudy, Sean Coco, ThistleCoast, wildvlad
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 174,549
Threads: 93,727
Posts: 401,266
Top Poster: BrianSlick (7,954)
Welcome to our newest member, fgreg2692han
Powered by vBadvanced CMPS v3.1.0

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