Sets the classes that can appear within the (numerically) specified collection object argument to the specified method.
- iOS 11.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 11.0+
- watchOS 4.0+
NSSetcontaining Class objects—for example,
Specifies which method in the protocol is being configured.
Specifies the position (starting at index 0) of the parameter for which you are allowing classes. This may be either the position of a parameter in the method itself or the position in its reply block.
argis an index into the parameters of the reply block, or
falseif it is an index into the parameters of the method itself.
If an argument to a method in your protocol is a collection class (for example, NSArray or NSDictionary), then you must explicitly specify the set of expected classes that may appear within that collection.
If the expected classes are all property list types, calling this method is optional; property list types are allowed by default inside collection objects. You may, however, call this method to further restrict the set of allowed classes.