views:

39

answers:

2

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
yes,i want to know how to display a number stored in a variable to textview
lak in iphone
I have modified my answer to include more info
Digital Robot
A: 
myTextView.text = [NSString stringWithFormat:@"%d", yourNumberVariable]

You should adjust "%d" to whatever the type of the variable is.

Mihai Fonoage