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 05-20-2010, 04:36 PM   #5 (permalink)
justill45
Beast Iphone Developor
 
justill45's Avatar
 
Join Date: Aug 2009
Location: Atlanta, Georgia
Age: 16
Posts: 1,302
justill45 is on a distinguished road
Default

Quote:
Originally Posted by Momeks View Post
it's very simple first of all add a UIViewController [check the xib too ] to your project and . let's write the code

Assuming i have a button on the FirstViewController , ok ,

FirstViewController.h :

Code:
-(IBAction)gotoViewTwo:(id)sender ;

FirstViewController.m :

#import "FirstViewController.h"
#import "SecondViewController.h"


Code:
-(IBAction)gotoViewOne:(id)sender 

{

SocondViewController *viewTwo= [[SecondViewController alloc] initWithNibName:@"SocondViewController " bundle:nil];
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:1];
	[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
	[self.view addSubview:viewTwo.view];
	[UIView commitAnimations];

}
write above codes for button on the view 2 :



Code:
#import "SecondViewController.h"
#import "FirstViewController.h"


FirstViewController *viewOne= [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:1];
	[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
	[self.view addSubview:viewOne.view];
	[UIView commitAnimations];

}


if u keep adding each one to self.view as a subview, wont it stack up because your not getting rid of the view, just covering it with another view, or does it get rid of the view underneath?
justill45 is offline   Reply With Quote
 

» Advertisements
» Online Users: 455
18 members and 437 guests
Absentia, AppsImpact, Brandt, BuzzingDanZei, Domele, dtkamal, falco1973, fschwehn, jbro, JMLdev, muhimranss, nestochi, onenoc, roelien, ryantcb, seecoolguy, SLIC, vbovio
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,549
Threads: 94,076
Posts: 402,719
Top Poster: BrianSlick (7,990)
Welcome to our newest member, JMLdev
Powered by vBadvanced CMPS v3.1.0

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