Uiactivityindicatorview is very simple, it is a loop control initialization method-Initwithactivityindicatorstyle control an activity indicator- startanimating-stopanimating-isanimatinghideswhenstopped Property configuration Activity Indicator appearance Activityindicatorviewstyle Attribute Color property (introduced by IOS 5) constant three typedef enum {uiactivityindicatorviewstylewhitelarge, uiactivityindicatorviewstylewhite, Uiac Tivityindicatorviewstylegray,} Uiactivityindicatorviewstyle; The way to use is uiactivityindicatorview *testactivityindicator = [Uiactivityindicatorview alloc]Initwithactivityindicatorstyle: Uiactivityindicatorviewstylewhite]];testactivityindicator.center = Cgpointmake (100.0f, 100.0f);//can only set center, cannot set size[Testactivityindicator setframe = cgrectmack (100, 100, 100, 100)];//does not recommend this setting, Because Uiactivityindicatorview is not able to change the size can only change the position, so that the result is the center of the control on (100,100), and not the same as the other control frame in the upper left corner of (100, 100) is 100, width is.[Self Addsubview:testactivityindicator];testactivityindicator.color = [Uicolor Redcolor]; Change the color of the circle to Red, IOS5 introduced [Testactivityindicator startanimating]; Start rotation [Testactivityindicator stopanimating]; End rotation [Testactivityindicator Sethideswhenstopped:yes]; When the rotation is closed and there is a isanimating method, return a bool value, you can use this method to determine whether the control is rotated Initwithactivityindicatorstyle is Uiactivityindicatorview the only initialization method property value is an enumeration variable, Only three values: Uiactivityindicatorviewstylewhite; White Circle Uiactivityindicatorviewstylewhitelarge; White Circle but bigger uiactivityindicatorviewstylegray; Gray Circle
Use of Uiactivityindicatorview