Instance Method インスタンスメソッド

willChangeValue(forKey:withSetMutation:using:)

Informs the observed object that the specified change is about to be made to a specified unordered to-many relationship.

Declaration 宣言

func willChangeValue(forKey key: String, 
     withSetMutation mutationKind: NSKeyValueSetMutationKind, 
               using objects: Set<AnyHashable>)

Parameters パラメータ

key

The name of a property that is an unordered to-many relationship

mutationKind

The type of change that will be made.

objects

The objects that are involved in the change (see NSKeyValueSetMutationKind).

Discussion 解説

Use this method when implementing key-value observer compliance manually.

Special Considerations 特別な注意事項

You rarely need to override this method in subclasses, but if you do, be sure to call super.

See Also 参照

Notifying Observers of Changes