tags:

views:

47

answers:

1

I want to update uitextview from another uiviewcontroller classes.

Can anyone help me?

Thanks in advance..

A: 

It is not exactly clear what you are asking, but I think you mean that you want to send a message to a UITextView instance within another UIViewController subclass.

So long as this UITextView is a member of this UIViewController, you can send messages to it. (Of course, it must be declared as a property for getters and setters).

Example:

OtherViewController *otherViewController = [[OtherViewController alloc] init];
[[otherViewController textView] setText:@"your text here"];
[[self navigationController] pushViewController:otherViewController animated:YES];

I suppose this could be useful if you were about to switch push or pop a view controller and needed to add information to it before you did so. Hopefully this answered your question.

Jonathan Sterling