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

View Single Post
Old 01-03-2009, 01:59 PM   #57 (permalink)
offcampus
New Member
 
Join Date: Sep 2008
Posts: 4
offcampus is on a distinguished road
Default

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!
offcampus is offline   Reply With Quote
 

» Advertisements
» Online Users: 435
15 members and 420 guests
aqlucky, diane21, elhanche, freewind, guillermotricia, hrushikeshaddon, iOS.Lover, IphoneSdk, iram91418, jeroenkeij, LunarMoon, nicsmotherman, poke, ryantcb, Viekiehug
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,610
Threads: 94,084
Posts: 402,790
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Viekiehug
Powered by vBadvanced CMPS v3.1.0

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