Skip to content

swift_dynamicCastUnknownClass(____)

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

swift_dynamicCastUnknownClass(_:_:)

Checked dynamic cast of a class instance pointer to the given type.

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

Parameters

  • object: The class instance to cast.
  • targetType: The type to cast the class to

Returns

The class instance if successful, and nil otherwise.

Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally