I used IMvXModelTouchView to custom animate pop-ups. And I have a close button for this tooltip. How can I return to the previous view?
Here is my code as follows:
public class PopupView : MvxViewController, IMvxModalTouchView { public PopupView() { ModalPresentationStyle = UIModalPresentationStyle.PageSheet; } public override void ViewDidLoad() { Title = "Map"; base.ViewDidLoad(); var closeButton = new UIButton(new RectangleF(0, 0, 50, 30)); closeButton.TouchUpInside += CloseButtonClicked(); Add(closeButton); } private EventHandler CloseButtonClicked() { return (sender, args) => NavigationController.DismissViewController(true, null); } }
It worked when I click this close button, but it crashes when I try to open this view again.
source share