How to get textView data in UIPickerView of another ViewController
hai
How to get the textView data in UIPickerView. UIPickerView is in another ViewController and it is a mutab开发者_如何学运维learray. Can anyone help me? Help with some code or tutorial. please.. Thank youCan't you just create a method in the viewController that is containing that UIPickerView and call that method whenever the ok button is pressed sending the text string as a parameter, and then in that method, the picker's viewController can populate its field with the sent text?
You can have 1 NSString property in another ViewController. 1 Method to assign textView data in that. like
- @property (nonatomic,retain) NSString *yourString; and Synthesize it.
-(void) contentToDisplay: (NSString *)yourContent{
self.yourString = yourContent;
}
While switching to another ViewController use its object to assign text like [objViewController contentToDisplay:yourText];
hope this helps.
精彩评论