You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
codepath-wiki-review[bot] edited this page Nov 17, 2026
·
12 revisions
Add activity indicator to storyboard
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.
Create an Outlet
control + drag from the activity indicator in the storyboard canvas (or document outline) to the Swift file.
Start / Stop animating
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];