-(BOOL)textViewShouldBeginEditing:(UITextView *)textView

Discussion in 'iOS Programming' started by andyiapan, Dec 2, 2010.

  1. andyiapan, Dec 2, 2010
    Last edited by a moderator: Dec 2, 2010

    andyiapan macrumors newbie

    Joined:
    Feb 28, 2010
    #1
    Code:
    -(BOOL)textViewShouldBeginEditing:(UITextView *)textView {
    
    ...
    }
    
    if i want to handle textview,
    how can i call this function in other function?

    Thanks
     
  2. jared_kipe macrumors 68030

    jared_kipe

    Joined:
    Dec 8, 2003
    Location:
    Seattle
    #2
    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.
     

Share This Page