-3

is there any way to add UIActivityindicatorView in UIAlertView like Loading?

Please help me.

Thanks

Scott Berrevoets
  • 16,921
  • 6
  • 59
  • 80

4 Answers4

2

You're not supposed to modify or mess with the UIAlertView elements. If you look at Apple's documentation for UIAlertView, it says:

Subclassing Notes

The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.

Better to do your own UIView and add an activity indicator view to that.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
1

Apple restrict the user the access the subViews of UIAlertView to maintain the UIAlertView interface standard on IOS 7 release.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
CoolMonster
  • 2,258
  • 25
  • 50
0

No, unless you create your own view and use it instead of the UIAlertView one. There's no way of adding subviews to it.

Antonio MG
  • 20,382
  • 3
  • 43
  • 62
0

Not to UIAlertView, but take a look at SDCAlertView. It's a UIAlertView replica that does have support for displaying custom views.

Scott Berrevoets
  • 16,921
  • 6
  • 59
  • 80