shallow icon indicating copy to clipboard operation
shallow copied to clipboard

`UITextView` missing events for EditingStarted, EditingEnded.

Open dvdsgl opened this issue 10 years ago • 0 comments

I had to implement a delegate, which luckily was really easy in F#:

 // Use delegate to display the placeholder message
 text.Delegate <- { new UITextViewDelegate() with
    member this.EditingStarted _ =
        if text.Text = placeholder then
            text.Text <- ""
            text.TextColor <- UIColor.DarkTextColor
            text.BecomeFirstResponder() |> ignore

    member this.EditingEnded _ =
        if text.Text = "" then
            text.Text <- placeholder
            text.TextColor <- placeholderColor
            text.BecomeFirstResponder() |> ignore
}

dvdsgl avatar Jun 19 '14 23:06 dvdsgl