How to use Ios--uiactivityindicatorview details

Source: Internet
Author: User

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

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.