Function

method_getArgumentType(_:_:_:_:)

Returns by reference a string describing a single parameter type of a method.

Declaration

func method_getArgumentType(_ m: Method, _ index: UInt32, _ dst: UnsafeMutablePointer<Int8>?, _ dst_len: Int)

Discussion

The parameter type string is copied to dst. dst is filled as if strncpy(dst, parameter_type, dst_len) were called. If the method contains no parameter with that index, dst is filled as if strncpy(dst, "", dst_len) were called.

See Also

Working with Methods

func method_getName(Method) -> Selector

Returns the name of a method.

func method_getImplementation(Method) -> IMP

Returns the implementation of a method.

func method_getTypeEncoding(Method) -> UnsafePointer<Int8>?

Returns a string describing a method's parameter and return types.

func method_copyReturnType(Method) -> UnsafeMutablePointer<Int8>

Returns a string describing a method's return type.

func method_copyArgumentType(Method, UInt32) -> UnsafeMutablePointer<Int8>?

Returns a string describing a single parameter type of a method.

func method_getReturnType(Method, UnsafeMutablePointer<Int8>, Int)

Returns by reference a string describing a method's return type.

func method_getNumberOfArguments(Method) -> UInt32

Returns the number of arguments accepted by a method.

func method_getDescription(Method) -> UnsafeMutablePointer<objc_method_description>

Returns a method description structure for a specified method.

func method_setImplementation(Method, IMP) -> IMP

Sets the implementation of a method.

func method_exchangeImplementations(Method, Method)

Exchanges the implementations of two methods.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software