Uiactivityindicatorview
1 Overridefunc viewdidload () {2 super.viewdidload ()3 4Titlelabel.text =titlestring5 6 //Do any additional setup after loading the view.7 8 //Create an Activity indicator9var Activityview:uiactivityindicatorview = Uiactivityindicatorview (Frame:cgrectmake ( -, -, -, -))Ten One //Add to view A Self.view.addSubview (ActivityView) - - //Start the activityview.startanimating () - - //If you want the indicator to be automatically hidden after it stops, just set the Hideswhenstopped property to Yes. The default is yes, and the indicator will still display when set to No stop. -activityview.hideswhenstopped =true + - //Stop + activityview.stopanimating () A at - //Setting Property Styles -Activityview.activityindicatorviewstyle =Uiactivityindicatorviewstyle.gray - - //get app Simple interest -var app:uiapplication =uiapplication.sharedapplication () in - //Set network activity indicator load toApp.networkactivityindicatorvisible =true + - the}
iOS Development--ui Article Swift &uiactivityindicatorview