Function

class_getSuperclass(_:)

Returns the superclass of a class.

Declaration

func class_getSuperclass(_ cls: AnyClass!) -> AnyClass!

Parameters

cls

A class object.

Return Value

The superclass of the class, or Nil if cls is a root class, or Nil if cls is Nil.

Discussion

You should usually use NSObject‘s superclass() method instead of this function.