Sets the superclass of a given class.
SDKs
- iOS 2.0–2.0Deprecated
- macOS 10.5–10.5Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
Framework
- Objective-C Runtime
Sets the superclass of a given class.
SDKs
Framework
func class _get Name(Any Class?) -> Unsafe Pointer<Int8>
Returns the name of a class.
func class _get Superclass(Any Class?) -> Any Class?
Returns the superclass of a class.
func class _is Meta Class(Any Class?) -> Bool
Returns a Boolean value that indicates whether a class object is a metaclass.
func class _get Instance Size(Any Class?) -> Int
Returns the size of instances of a class.
func class _get Instance Variable(Any Class?, Unsafe Pointer<Int8>) -> Ivar?
Returns the Ivar
for a specified instance variable of a given class.
func class _get Class Variable(Any Class?, Unsafe Pointer<Int8>) -> Ivar?
Returns the Ivar
for a specified class variable of a given class.
func class _add Ivar(Any Class?, Unsafe Pointer<Int8>, Int, UInt8, Unsafe Pointer<Int8>?) -> Bool
Adds a new instance variable to a class.
func class _copy Ivar List(Any Class?, Unsafe Mutable Pointer<UInt32>?) -> Unsafe Mutable Pointer<Ivar>?
Describes the instance variables declared by a class.
func class _get Ivar Layout(Any Class?) -> Unsafe Pointer<UInt8>?
Returns a description of the Ivar
layout for a given class.
func class _set Ivar Layout(Any Class?, Unsafe Pointer<UInt8>?)
Sets the Ivar
layout for a given class.
func class _get Weak Ivar Layout(Any Class?) -> Unsafe Pointer<UInt8>?
Returns a description of the layout of weak Ivar
s for a given class.
func class _set Weak Ivar Layout(Any Class?, Unsafe Pointer<UInt8>?)
Sets the layout for weak Ivar
s for a given class.
func class _get Property(Any Class?, Unsafe Pointer<Int8>) -> objc _property _t?
Returns a property with a given name of a given class.
func class _copy Property List(Any Class?, Unsafe Mutable Pointer<UInt32>?) -> Unsafe Mutable Pointer<objc _property _t>?
Describes the properties declared by a class.
func class _add Method(Any Class?, Selector, IMP, Unsafe Pointer<Int8>?) -> Bool
Adds a new method to a class with a given name and implementation.
func class _get Instance Method(Any Class?, Selector) -> Method?
Returns a specified instance method for a given class.
func class _get Class Method(Any Class?, Selector) -> Method?
Returns a pointer to the data structure describing a given class method for a given class.
func class _copy Method List(Any Class?, Unsafe Mutable Pointer<UInt32>?) -> Unsafe Mutable Pointer<Method>?
Describes the instance methods implemented by a class.
func class _replace Method(Any Class?, Selector, IMP, Unsafe Pointer<Int8>?) -> IMP?
Replaces the implementation of a method for a given class.
func class _get Method Implementation(Any Class?, Selector) -> IMP?
Returns the function pointer that would be called if a particular message were sent to an instance of a class.
func class _get Method Implementation _stret(Any Class?, Selector) -> IMP?
Returns the function pointer that would be called if a particular message were sent to an instance of a class.
func class _responds To Selector(Any Class?, Selector) -> Bool
Returns a Boolean value that indicates whether instances of a class respond to a particular selector.
func class _add Protocol(Any Class?, Protocol) -> Bool
Adds a protocol to a class.
func class _replace Property(Any Class?, Unsafe Pointer<Int8>, Unsafe Pointer<objc _property _attribute _t>?, UInt32)
Replace a property of a class.
func class _conforms To Protocol(Any Class?, Protocol?) -> Bool
Returns a Boolean value that indicates whether a class conforms to a given protocol.
func class _copy Protocol List(Any Class?, Unsafe Mutable Pointer<UInt32>?) -> Autoreleasing Unsafe Mutable Pointer<Protocol>?
Describes the protocols adopted by a class.
func class _get Version(Any Class?) -> Int32
Returns the version number of a class definition.
func class _set Version(Any Class?, Int32)
Sets the version number of a class definition.