Does anyone know how to display an Activity Indicator View in a Alert View on a TouchDown even开发者_运维知识库t?
Cool Thanks, I actually came up with this. It's a different approach:
public class ActivityIndicator : IDisposable
{
UIAlertView _alert;
UIActivityIndicatorView _ai;
public ActivityIndicator (String title)
{
_alert = new UIAlertView(title, String.Empty, null, null, null);
_ai = new UIActivityIndicatorView();
_ai.Frame = new System.Drawing.RectangleF(125,50,40,40);
_ai.ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.WhiteLarge;
_alert.AddSubview(_ai);
_ai.StartAnimating();
_alert.Show();
}
#region IDisposable implementation
void IDisposable.Dispose ()
{
_alert.DismissWithClickedButtonIndex(0, true);
}
#endregion
}
Here you can find a class that i created for this problem : https://gist.github.com/994791
You can use it like a normale UIAlertView.
精彩评论