Skip to content

Instantly share code, notes, and snippets.

@escoz
Created August 2, 2010 18:06
Show Gist options
  • Save escoz/505038 to your computer and use it in GitHub Desktop.
Save escoz/505038 to your computer and use it in GitHub Desktop.
private void _showCloseableModal(UIViewController controller) {
var nav = new UINavigationController(controller);
nav.NavigationBar.TintColor = UIColor.Black;
controller.NavigationItem.RightBarButtonItem = new UIBarButtonItem("Close", UIBarButtonItemStyle.Done, (object sender, EventArgs args)=>{
this.DismissModalViewControllerAnimated(true);
});
this.PresentModalViewController(nav , true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment