2012-03-22 44 views
-1

想从与NSMutableArray的标签动态创建文本框获取的价值标签上添加动态textfiled值....如何使用的plist

Txt_New_Estimated = [[UITextField alloc]initWithFrame:CGRectMake(360, textPosY , 130, 65)]; 
Txt_New_Estimated.delegate = self; 
[email protected]""; 
Txt_New_Estimated.tag = i; 
Txt_New_Estimated.clearButtonMode = UITextFieldViewModeWhileEditing; 
[Txt_New_Estimated addTarget:self action:@selector(C6Loop) forControlEvents:UIControlEventEditingChanged];//UIControlEventEditingDidEnd 
Txt_New_Estimated.placeholder = @"Estimated"; 
Txt_New_Estimated.font = [UIFont fontWithName:@"Arial" size:23]; 
Txt_New_Estimated.backgroundColor = [UIColor whiteColor]; 
Txt_New_Estimated.textAlignment = UITextAlignmentCenter; 
[scrollview addSubview:Txt_New_Estimated]; 
[textFieldArray addObject:Txt_New_Estimated]; 

了如何使用这行代码各项指标增加价值,

[textFieldArray4 addObject:Txt_New_ONU.text]; //值将增加零指数仅

意味着只有一个值将从该行添加...

,但我想在textFieldArray4零指数增添了无限的价值....

因为我在我的“Txt_New_ONU”文本字段使用标签....

如何做到这一点?请给一些想法....

谢谢你......

+0

当你想获取的价值?你有没有做完按钮? – Ilanchezhian 2012-03-22 10:53:39

回答

0

您应该检查UITextFieldDelegate中的Txt_New_Estimated.text值。

到这里看看:

UITextFieldDelegate Protocol Reference

我建议的方法是:

- (void)textFieldDidBeginEditing:(UITextField *)textField 
- (void)textFieldDidEndEditing:(UITextField *)textField