Iphone 如何在另一个类中显示相同的值';什么是文本字段?

Iphone 如何在另一个类中显示相同的值';什么是文本字段?,iphone,Iphone,嗨,我实现的代码如下所示,问题是当我单击click event textfield*settextvalue值没有出现在下一个视图textfield中时,请在iphone中为我提供解决方案 A.h级 @classB { UITextField *settextvalue; ClassB *b; } @property(nonatomic,retain)UITextField *settextvalue; @property(nonatomic,retain)ClassB *b;

嗨,我实现的代码如下所示,问题是当我单击click event textfield*settextvalue值没有出现在下一个视图textfield中时,请在iphone中为我提供解决方案

A.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;
}
你的财产是

@property(nonautomic,retain)UITextField *resultyear;
应该是

@property(nonatomic,retain)UITextField *resultyear;

请以正确的格式给出代码,它是不可读的。请学习如何格式化您的问题(以及您发布的代码)以使其可读。这看起来真难看。。!请用适当的格式发布问题