Skip to content

swift_dynamicCastMetatypeToObjectUnconditional(__)

0x41c edited this page Feb 28, 2022 · 1 revision

swift_dynamicCastMetatypeToObjectUnconditional(_:)

Takes an objective-c class object type and returns the underlying class.

@_silgen_name("swift_dynamicCastMetatypeToObjectUnconditional")
public func swift_dynamicCastMetatypeToObjectUnconditional(
    _ metaType: Any.Type
) -> AnyObject

Static methods can be called from the returned object.

Parameters

  • metaType: The type of the objective-c object. This is expected to be castable to AnyObject and should inherit from it. If this is not a valid NSObject, or AnyObject this function will call a dynamicCastFailiure.

Returns

The objective-c class object of the type when successful or aborts otherwise

Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally