hi all I have a one variable. i want to开发者_Go百科 print that varible into a text box. how to do this.
You can only display the string data in text box (UITextView
),if you have other than string data it require a conversion to NSString then use the text
properity of UITextView
to set the display text.
The below code is for your reference.
NSString* myData = @"dISPLAY me in text box";
UITextView* myTextView = [[UITextView alloc] initWithFrame:myframe];
myTextView.text = myData;
write
NSString * str=@"Text";
myTextField.text=str;
myTextField is the name of my textField(you can write the name of your text Field).
yourTextField.text = yourVariable;
If you want to have it as a string value you can make use of stringValue
You create a UILabel object, add it as a subview of your view, and call setText: on it.
Unless you are asking how to do GUI programming in general.
精彩评论