Last active
December 24, 2015 07:19
-
-
Save prashantvc/6762824 to your computer and use it in GitHub Desktop.
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
int ShowModalAletView (string title, string message, params string[] buttons) | |
{ | |
int clicked = -1; | |
var alertView = new UIAlertView (title, message, null, null, buttons); | |
alertView.Show (); | |
bool done = false; | |
alertView.Clicked += (sender, buttonArgs) => { | |
Console.WriteLine ("User clicked on {0}", buttonArgs.ButtonIndex); | |
clicked = buttonArgs.ButtonIndex; | |
}; | |
while (clicked == -1){ | |
NSRunLoop.Current.RunUntil (NSDate.FromTimeIntervalSinceNow (0.5)); | |
} | |
return clicked; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment