Uiactivityindicatorview
1.activityIndicatorViewStyle
Set the style of the indicator
Uiactivityindicatorviewstylewhitelarge
Uiactivityindicatorviewstylewhite (Default style)
Uiactivityindicatorviewstylegray
2.hidesWhenStopped
is hidden when the animation is stopped. The default is yes.
3. Instantiate the indicator object, set the dimensions according to the style and do not need to be set manually.
-(ID) Initwithactivityindicatorstyle: (uiactivityindicatorviewstyle) style;
4. Turn on animations
-(void) startanimating;
5. Turn off animations
-(void) stopanimating;
6. Is the animation
-(BOOL) isanimating;
7. Uiactivityindicatorview Use note
7.1 You do not need to set the size when initializing, the size is not effective.
7.2 must be called startanimating to display Uiactivityindicatorview
Initialization indicator
Uiactivityindicatorview *indicator = [[Uiactivityindicatorview alloc] Initwithactivityindicatorstyle: Uiactivityindicatorviewstylewhitelarge];
Set indicator position
Indicator.center = Cgpointmake (self.view.frame.size.width * 0.5, Self.view.frame.size.height * 0.5);
Start animation, must be called, otherwise cannot be displayed
[Indicator startanimating];
[Self.view Addsubview:indicator];
iOS Development UI Foundation Uiactivityindicatorview Properties