Tag: xamarin.ios uitextview

ShouldChangeTextInRange不被UITextView调用

我用户自定义UITextView,并需要隐藏键盘上返回点击。 我需要赶上'ShouldChangeTextInRange'有什么textview,我不知道为什么,但方法不叫。 这里是我的文字视图的代码: public class PlaceholderTextView : UITextView { public PlaceholderTextView () { Initialize (); } public PlaceholderTextView (CGRect frame) : base (frame) { Initialize (); } public PlaceholderTextView (IntPtr handle) : base (handle) { Initialize (); } void Initialize () { Text = Placeholder; ShouldBeginEditing = t => { if (Text == Placeholder) Text […]