Skip to content

swift_dynamicCastMetatypeToObjectConditional(__)

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

swift_dynamicCastMetatypeToObjectConditional(_:)

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

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

Static methods can be called from the returned object.

Parameters

  • metaType: The type of the objective-c object. This should be castable to NSObject AnyObject.

Returns

The objective-c class object of the type or nullptr if the type is a native swift type.

Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally