<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LocalAuthenticationEmbeddedUI",
  "identifier" : "/documentation/LocalAuthenticationEmbeddedUI/LAAuthenticationView/init(context:controlSize:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Local Authentication Embedded UI"
    ],
    "preciseIdentifier" : "c:objc(cs)LAAuthenticationView(im)initWithContext:controlSize:"
  },
  "title" : "init(context:controlSize:)"
}
-->

# init(context:controlSize:)

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

```
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

This initializer behaves like [`init(context:)`](/documentation/LocalAuthenticationEmbeddedUI/LAAuthenticationView/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 <doc://com.apple.documentation/documentation/AppKit/NSControl/ControlSize-swift.enum/regular>
size by default.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)