---
title: "init(set:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsset/init(set:)-7a7ws"
---

# init(set:)

Initializes a newly allocated set and adds to it objects from another given set.

## Declaration

```swift
@nonobjc convenience init(set anSet: NSSet)
```

## Return Value

Return Value An initialized objects set containing the objects from set. The returned set might be different than the original receiver.
