---
title: "init(context:controlSize:)"
framework: localauthenticationembeddedui
role: symbol
role_heading: Initializer
path: "localauthenticationembeddedui/laauthenticationview/init(context:controlsize:)"
---

# init(context:controlSize:)

Creates a new authentication icon that reflects the current authentication state, using a specified size.

## Declaration

```swift
init(context: LAContext, controlSize: NSControl.ControlSize)
```

## Parameters

- `context`: A local authentication context to associate with the icon.
- `controlSize`: The size of the authentication view’s user interface element. Use one of the values in doc://com.apple.documentation/documentation/AppKit/NSControl/ControlSize-swift.enum.

## Discussion

Discussion This initializer behaves like init(context:), except that it also allows you to specify a size for the view. If you don’t specify a size, the view uses the NSControl.ControlSize.regular size by default.

## See Also

### Controlling the size of a local authentication view

- [controlSize](localauthenticationembeddedui/laauthenticationview/controlsize.md)
