Reputation: 551
hi all i have implemented code as shown in the below here problem is when i clicked on click event textfield *settextvalue value is not appearing into the next view textfield for this give me the solution in iphone.
ClassA.h
@classB
{
UITextField *settextvalue;
ClassB *b;
}
@property(nonatomic,retain)UITextField *settextvalue;
@property(nonatomic,retain)ClassB *b;
@end
ClassA.m
{
@ synthesize b,settextvalue;
-(void)viewDidload{
b = [[ClassB alloc]init];
settextvalue.text=@"333";
}
-(IBAction)resultOfvalue{
[self.view addSubview:[b view]];
settextvalue.text = b.resultyear.text;
}
Class B.h {
UITextField *resultyear;
}
@property(nonatomic,retain)UITextField *resultyear;
@end
Class B.m
{
@synthesize resultyear;
}
Upvotes: 0
Views: 199
Reputation: 7733
your property is
@property(nonautomic,retain)UITextField *resultyear;
It Should be
@property(nonatomic,retain)UITextField *resultyear;
Upvotes: 2