---
title: "init(coder:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nstouchbaritem/init(coder:)"
---

# init(coder:)

Initializes and returns a new item from a storyboard or nib file.

## Declaration

```swift
init?(coder: NSCoder)
```

## See Also

### Creating a bar item

- [init(identifier:)](appkit/nstouchbaritem/init(identifier:).md)
- [NSTouchBarItem.Identifier](appkit/nstouchbaritem/identifier-swift.struct.md)
