---
title: "init(style:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uiactivityindicatorview/init(style:)"
---

# init(style:)

Creates an activity indicator.

## Declaration

```swift
init(style: UIActivityIndicatorView.Style)
```

## Parameters

- `style`: A constant that specifies the style of the object to be created. See doc://com.apple.uikit/documentation/UIKit/UIActivityIndicatorView/Style-swift.enum for descriptions of the style constants.

## Return Value

Return Value An initialized UIActivityIndicatorView object.

## Discussion

Discussion UIActivityIndicatorView sizes the returned instance according to the specified style. You can set and retrieve the style of an activity indicator through the style property.

## See Also

### Creating an activity indicator

- [init(frame:)](uikit/uiactivityindicatorview/init(frame:).md)
- [init(coder:)](uikit/uiactivityindicatorview/init(coder:).md)
