public void hidePopup() { if (this.popup != null) { this.delegate_.willHidePopup(this); if (this.popupLabel != null) { this.popupLabel.RemoveFromSuperview(); } if (this.popupLabel != null) { this.popupLabel = null; } this.connector.RemoveFromSuperview(); this.connector = null; this.popup.RemoveFromSuperview(); this.popup = null; this.label.Hidden = false; this.background.attach(null); this.Layer.ZPosition = 0; this.popupDirection = null; } }
public void configurePopup(Direction direction) { //assert(this.popup != null, "popup not found"); this.background.attach(direction); this.popup.attach(direction.opposite()); var kv = this.background; var p = this.popup; if (this.connector != null) { this.connector.RemoveFromSuperview(); } this.connector = new KeyboardConnector(cornerRadius: 4, underOffset: this.underOffset, s: kv, e: p, sC: kv, eC: p, startDirection: direction, endDirection: direction.opposite()); this.connector.Layer.ZPosition = -1; this.AddSubview(this.connector); // this.drawBorder = true; if (direction == Direction.Up) { // this.popup!.drawUnder = false; // this.connector!.drawUnder = false; } }