i want to display a number assigned to variable on text view ... how to show number on text view
A:
Have you added that UITextView to the main view? Something like
[self.view addSubview:myTextView];
[myTextView setText:@"Hello World"];
or
// this will "convert" from integer to string
[myTextView setText = [NSString stringWithFormat:@"%d", myNumber]
Digital Robot
2010-08-04 17:14:25
yes,i want to know how to display a number stored in a variable to textview
lak in iphone
2010-08-04 17:16:46
I have modified my answer to include more info
Digital Robot
2010-08-04 17:32:19
A:
myTextView.text = [NSString stringWithFormat:@"%d", yourNumberVariable]
You should adjust "%d" to whatever the type of the variable is.
Mihai Fonoage
2010-08-04 17:23:34