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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-19-2009, 11:49 PM   #4 (permalink)
JohnMabassa
Registered Member
 
Join Date: Feb 2009
Location: India
Posts: 137
Default it works

Hi the solution really worked

here is what i did

in secondViewController.h I declared a string as property
Code:
@interface secondViewController : UIViewController {


	IBOutlet UILabel *labelName;
	NSString *textValue;
}

@property (nonatomic,retain) UILabel *labelName;
@property (nonatomic,retain) NSString *textValue;
in secondViewController.m

Code:
-(void)viewWillAppear:(BOOL)animated{

	labelName.text=textValue;
}
in firstViewController.m
Code:
	if(self.secondViewController==nil){
		SecondController *view2=[[SecondViewController alloc] initWithNibName:@"SecondView" bundle:[NSBundle mainBundle]];
		self.secondViewController=view2;
		[view2 release];
	}
	secondViewController.textValue =txtField.text;
	[self.navigationController pushViewController:secondViewController animated:YES];

Thanks for the help
JohnMabassa is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,726
Threads: 89,184
Posts: 380,513
Top Poster: BrianSlick (7,126)
Welcome to our newest member, donbran2
Powered by vBadvanced CMPS v3.1.0

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