-
Notifications
You must be signed in to change notification settings - Fork 472
Using UIActivityIndicatorView
Paco Nieto edited this page Mar 13, 2022
·
10 revisions
-
Add the Activity Indicator View to your storyboard from the Object Library
-
Choose a style and color
-
Select "Hides When Stopped" in order to automatically hide the activity indicator any time it's not animating.
-
control + drag from activity in storyboard canvas (or document outline) to swift file.
Tell the Activity Indicator View to start animating.
// Start the activity indicator
activityIndicator.startAnimating()
// Stop the activity indicator
// Hides automatically if "Hides When Stopped" is enabled
activityIndicator.stopAnimating()
// Start the activity indicator
[self.activityIndicator startAnimating];
// Stop the activity indicator
// Hides automatically if "Hides When Stopped" is enabled
[self.activityIndicator stopAnimating];