In my nib, I have a UITextView
component.
In my code I have a UITextView
field and I have used Interface Builder to make sure that the two are connected (at least I think I did that by dragging from "Files Owner" and dropping it on the UITextView
in Interface Builder and selecting my member variable).
Now, when I update the text via setText
, the UITextView still remains blank.
Thanks DeShawn
Have you used
@property(nonatomic,retain) UITextView *yourTextViewName;
then
@synthesize yourTextViewName;
in .m
file?
If yes, use the following code in viewDidLoad
after updating the value to check:
NSLog(@"Text View Value = %@",yourTextViewName.text);
If it isn't figured it out yet; check out iOS Text View Not Updating
The referencing yourTextViewName must be an IBOutlet UITextView *yourTextViewname
Then add the @property (nonatomic, retain) UITextView *yourTextViewName
.
Add the @synthesize yourTextViewName
in the corresponding .m file.
To set the text, use
yourTextViewName.text = @"some text";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With