Skip to content

swift_dynamicCastObjCClassMetatype(____)

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

swift_dynamicCastObjCClassMetatype(_:_:)

Check to determine castability from a source type of objective-c origin to a target type also of the same origin.

@_silgen_name("swift_dynamicCastObjCClassMetatype")
public func swift_dynamicCastObjCClassMetatype(
    _ sourceType: Any.Type,
    _ targetType: Any.Type
) -> UnsafeRawPointer?

Parameters

  • sourceType: The source type to cast into the target type.
  • targetType: The target type to cast into the source type.

Returns

The source type if successful or nil otherwise.

Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally