Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-19-2009, 10:49 PM   #4 (permalink)
JohnMabassa
Registered Member
 
Join Date: Feb 2009
Location: India
Posts: 125
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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,348
Threads: 39,139
Posts: 171,599
Top Poster: smasher (2,577)
Welcome to our newest member, faroligo
Powered by vBadvanced CMPS v3.1.0

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