Inserts the given element into the set.
SDKs
- iOS 13.0+
- Xcode 11.0+
Framework
- Reality
Kit
Declaration
@discardableResult mutating func update(with newMember: ARView.Entity Gestures) -> ARView.Entity Gestures?
Return Value
The intersection of [new
and the set if the intersection was nonempty; otherwise, nil
.
Discussion
If new
is not contained in the set but subsumes current members of the set, the subsumed members are returned.
var options: ShippingOptions = [.secondDay, .priority]
let replaced = options.update(with: .express)
print(replaced == .secondDay)
// Prints "true"