Created
June 5, 2014 15:11
-
-
Save benbishop/885ac6ed3c153e96df83 to your computer and use it in GitHub Desktop.
A custom UIStoryboardSegue class for dismissing modals in Xamarin.iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using MonoTouch.UIKit; | |
using MonoTouch.Foundation; | |
namespace Rendr | |
{ | |
[Register ("DismissSegue")] | |
public class DismissSegue:UIStoryboardSegue | |
{ | |
public DismissSegue (IntPtr param) : base (param) | |
{ | |
} | |
public override void Perform () | |
{ | |
UIViewController src = this.SourceViewController; | |
src.DismissViewController (true, null); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment