开发者

How to make a UITextField receive NSUserDefault data?

I have 4 views. 3 views are used to input data in several UITextFields and then are saved using NSUserDefault... Is there a wa开发者_JS百科y to make a UITextField on the 4th view collect data from the other 3 views. I want the UITextField on view 4 to show the total of the other UITextFields.


myBigTextField.text=[NSString stringWithFormat:@"txt1:%@ txt2:%@ txt3:%3 txt4:%@",myTextField1.text,myTextField2.text,myTextField3.text,myTextField4.text];

to get a "sum" of all other textfields at a given time. If you want this to happen as the user types the text into the textfields, you need to implement a selector for "editing changed" IBAction, and link it to your textfields, then, inside that function, update the big textfield.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜