class_respondsToSelector(_:_:)
Returns a Boolean value that indicates whether instances of a class respond to a particular selector.
Declaration
func class_respondsToSelector(_ cls: AnyClass?, _ sel: Selector) -> BoolParameters
- cls:
The class you want to inspect.
- sel:
A selector.
Return Value
YES if instances of the class respond to the selector, otherwise NO.
Discussion
You should usually use NSObject’s responds(to:) or instancesRespond(to:) methods instead of this function.
See Also
Working with Classes
class_getName(_:)class_getSuperclass(_:)class_setSuperclass(_:_:)class_isMetaClass(_:)class_getInstanceSize(_:)class_getInstanceVariable(_:_:)class_getClassVariable(_:_:)class_addIvar(_:_:_:_:_:)class_copyIvarList(_:_:)class_getIvarLayout(_:)class_setIvarLayout(_:_:)class_getWeakIvarLayout(_:)class_setWeakIvarLayout(_:_:)class_getProperty(_:_:)class_copyPropertyList(_:_:)