Skip to content

swift_dynamicCastObjCClass(____)

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

swift_dynamicCastObjCClass(_:_:)

Checked Objective-C-style dynamic cast to a class type.

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

Parameters

  • object: The object to cast into a new type
  • targetType: The new type to cast the object into

Returns

A pointer to the cast object when successful, or nil otherwise.

Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally