大家好我已经实现了如下所示的代码问题是当我点击事件文本字段时* settextvalue值没有出现在下一个视图文本字段中,这给了我在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;
}
答案 0 :(得分:2)
你的财产是
@property(nonautomic,retain)UITextField *resultyear;
应该是
@property(nonatomic,retain)UITextField *resultyear;