FormSheet modal dialog won't hide
I have a modal dialog that I show using the following code:
private void ShowUpdateDialog(f开发者_Go百科loat version, bool breakingChanges, string hint, string storeLink, string changelog, params string[] pars)
{
var dialog = new UpdatePopupController(this, new RectangleF(20, 20, 550, 600));
dialog.WantsFullScreenLayout = true;
dialog.ModalPresentationStyle = UIModalPresentationStyle.FormSheet;
dialog.ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal;
dialog.ModalInPopover = true;
UIDevice.CurrentDevice.BeginGeneratingDeviceOrientationNotifications();
dialog.ShowData(version, breakingChanges, hint, storeLink, changelog, pars);
dialog.WillRotate(UIApplication.SharedApplication.StatusBarOrientation, 0);
NavigationController.PresentModalViewController(dialog, true);
dialog.BecomeFirstResponder();
}
I get this result (that is what I expected):
Now I want to implement closing the dialog by taping out of the gray content of the dialog. How can I do it? The dialog itself inherits from UIViewController.
Dont make it Modal. Then it works
dialog.ModalInPopover = false;
See this question which asks the same thing.
Personally I would have a button which upon TouchDown would dismiss the modal view.
精彩评论