public EditableCoreTextView(CGRect frame) : base(frame) { // Add tap gesture recognizer to let the user enter editing mode UITapGestureRecognizer tap = new UITapGestureRecognizer(Tap) { ShouldReceiveTouch = delegate(UIGestureRecognizer recognizer, UITouch touch) { // If gesture touch occurs in our view, we want to handle it return(touch.View == this); } }; AddGestureRecognizer(tap); // Create our tokenizer and text storage tokenizer = new UITextInputStringTokenizer(); // Create and set up our SimpleCoreTextView that will do the drawing textView = new SimpleCoreTextView(Bounds.Inset(5, 5)); textView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; UserInteractionEnabled = true; AutosizesSubviews = true; AddSubview(textView); textView.Text = string.Empty; textView.UserInteractionEnabled = false; }
protected override void Dispose (bool disposing) { markedTextStyle = null; tokenizer = null; text = null; textView = null; base.Dispose (disposing); }
protected override void Dispose(bool disposing) { markedTextStyle = null; tokenizer = null; text = null; textView = null; base.Dispose(disposing); }
public EditableCoreTextView (CGRect frame) : base (frame) { // Add tap gesture recognizer to let the user enter editing mode UITapGestureRecognizer tap = new UITapGestureRecognizer (Tap) { ShouldReceiveTouch = delegate(UIGestureRecognizer recognizer, UITouch touch) { // If gesture touch occurs in our view, we want to handle it return touch.View == this; } }; AddGestureRecognizer (tap); // Create our tokenizer and text storage tokenizer = new UITextInputStringTokenizer (); // Create and set up our SimpleCoreTextView that will do the drawing textView = new SimpleCoreTextView (Bounds.Inset (5, 5)); textView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; UserInteractionEnabled = true; AutosizesSubviews = true; AddSubview (textView); textView.Text = string.Empty; textView.UserInteractionEnabled = false; }