init(for:)
Returns the class description for a given class.
Declaration
init?(for aClass: AnyClass)Parameters
- aClass:
The class for which to return a class description. See note below for important details.
Return Value
The class description for aClass, or nil if a class description cannot be found.
Discussion
If a class description for aClass is not found, the method posts an NSClassDescriptionNeededForClassNotification on behalf of aClass, allowing an observer to register a class description. The method then checks for a class description again. Returns nil if a class description is still not found.
If you have an instance of the receiver’s class, you can use the NSObject instance method classDescription instead.
See Also
Related Documentation
- Cocoa Scripting Guide
- Key-Value Coding Programming Guide