Last active
December 19, 2015 03:59
-
-
Save aspnetde/5894488 to your computer and use it in GitHub Desktop.
Calling the Show()-Method within ViewDidLoad() works, it event works when calling it within the first tap-handler of the StringElement. But calling it in the click-handler of the alert view, it disappears.
This file contains hidden or 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 System.Collections.Generic; | |
using System.Linq; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
using MonoTouch.Dialog; | |
using BigTed; | |
namespace iOS.ProgressHUD.Demo | |
{ | |
public partial class Demo : DialogViewController | |
{ | |
public Demo() : base (UITableViewStyle.Grouped, null) | |
{ | |
Root = new RootElement("Demo") | |
{ | |
new Section ("Demo"){ | |
new StringElement ("Show Spinner", () => { | |
var alert = new UIAlertView( | |
"Type something in", | |
"Foo", | |
null, | |
"Cancel", | |
"Show me the HUD" | |
); | |
alert.Clicked += ShowHUD; | |
alert.Show(); | |
}), | |
} | |
}; | |
} | |
void ShowHUD(object sender, UIButtonEventArgs e) | |
{ | |
if (e.ButtonIndex == 0) | |
return; | |
BTProgressHUD.Show("Hello World ... this should not disappear ..."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment