Use of Uiactivityindicatorview

Source: Internet
Author: User




: IOS
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.