public override void AddToView(object obj) { Anchor.AddAsSubview(obj); TextView.AddAsSubview(obj); NoteIcon.AddAsSubview(obj); UtilityLayer.AddAsSubview(obj); DeleteButton.AddAsSubview(obj); CloseButton.AddAsSubview(obj); TryAddDebugLayer(obj); }
public override void AddAsSubview(object masterView) { // we know that masterView will be an iOS View. UIView view = masterView as UIView; if (view == null) { throw new Exception("Object passed to iOS AddAsSubview must be a UIView."); } TextView.AddAsSubview(view); // add the handler when we're in a hierarchy ObserverHandle = NSNotificationCenter.DefaultCenter.AddObserver(UITextView.TextDidChangeNotification, OnTextChanged); }