---
title: "init(coder:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/nstextlinefragment/init(coder:)"
---

# init(coder:)

Creates a new line fragment with from data in an unarchiver.

## Declaration

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

## Parameters

- `aDecoder`: A decoder that conforms to the doc://com.apple.documentation/documentation/Foundation/NSCoder protocol.

## See Also

### Creating line fragments

- [init(attributedString:range:)](uikit/nstextlinefragment/init(attributedstring:range:).md)
- [init(string:attributes:range:)](uikit/nstextlinefragment/init(string:attributes:range:).md)
