How to use Ios--uiactivityindicatorview details
The usual method of Uiactivityindicatorview activity indicator is the rotation progress wheel
Uiactivityindicatorview *oneindicatorview = [[Uiactivityindicatorview alloc]init];
Oneindicatorview.activityindicatorviewstyle = Uiactivityindicatorviewstylewhitelarge; Set the displayed style
The following are all the styles
typedef ns_enum (Nsinteger, Uiactivityindicatorviewstyle) {
Uiactivityindicatorviewstylewhitelarge,
Uiactivityindicatorviewstylewhite,
Uiactivityindicatorviewstylegray,
//};
Oneindicatorview.frame = CGRectMake (20, 20, 100, 100); Set Location
Oneindicatorview.center = Cgpointmake (180, 100); Set the center of the indicator
Oneindicatorview.backgroundcolor = [Uicolor Bluecolor]; Setting the background color is not usually set, can see a person likes
oneindicatorview.hideswhenstopped = YES; Hide when stopped
[Oneindicatorview startanimating]; Start turning
[Oneindicatorview stopanimating]; Stop turning
NSLog (@ "%d", oneindicatorview.isanimating); Whether there is an animation
NSLog (@ "%d", Oneindicatorview.ishidden); Determines whether to show, 0 is displayed, 1 is not displayed
[Self.view Addsubview:oneindicatorview]; Add to view
[Oneindicatorview release], Oneindicatorview = nil; Freeing memory
This control is very simple to use, but be aware that it is a different background when you must pay attention to its style, because the white background can only use the Uiactivityindicatorviewstylegray style, otherwise you will not see it,
How to use Ios--uiactivityindicatorview details