How can I call some code upon entering a UITextView (user taps to edit it) and leaving the view (user taps to leave it)?
Appreciate any help.
txtviewaddress.text="Address"
txtViewAddress.TextColor = UIColor.LightGray;
txtViewAddress.ShouldBeginEditing += (textView) =>
{
txtViewAddress.Text = "";
txtViewAddress.TextColor = UIColor.Black;
return true;
};
txtViewAddress.ShouldEndEditing += (textView) =>
{
if (textView.Text == "")
{
txtViewAddress.Text = " Address";
txtViewAddress.TextColor = UIColor.LightGray;
}
return true;
};