Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

andyiapan

macrumors newbie
Original poster
Feb 28, 2010
29
0
Code:
-(BOOL)textViewShouldBeginEditing:(UITextView *)textView {

...
}
if i want to handle textview,
how can i call this function in other function?

Thanks
 
Last edited by a moderator:
That is a delegate method, you don't call it directly. The text view itself calls it on its delegate.

As a delegate you implement that method to return YES or NO depending on your own program logic and if that text view can become editable.


IF you are just wanting to tell a textview to grab focus so that keyboard input will go into it and have the blinking cursor, you should call -becomeFirstResponder on your textview from some controller.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.