Working on an experiment on the iPad. Tried some variations on how to do this, but I can’t seem to get it to work correctly…
I tap a UIButton on my MainViewController and a TextEntryModule is added to the view. TextEntryModule is its own class (for multiple instantiation) and it contains a UITextView called TextEntry (this all works at the moment).
I tap on the TextEntry UITextView and it brings up the keyboard and another view (located in MainViewController) with a UITextView called TextPreview. (this also works at the moment).
The part I’m having trouble with is synching the two UITextViews. The idea being that when I type into TextEntry, the text in TextPreview will also be updated.
Outlets are linked properly for the text fields, but I think I’m missing something “obvious”:
TextEntryModule *tm = (AnnotationModule *)currentModule;
TextPreview.text = tm.TextEntry.text
Thanks in advance!
UITextView: delegate.
Then assign it the value of the other textview in this method.
Edit
Then you implement this method in the implementation file of MainViewController
Then you will have to set the TextEntryModule object’s delegate to
selfsince the controller now conform to the protocol and can “act” upon this notification.