Does Objective C & Swift support Hierarchical inheritance?

I know that Objective C and Swift supports Multilevel inheritance. But does they support hierarchical inheritance too or is it that any language that supports Multilevel inheritance supports hierarchical by default.

1 answer

  • answered 2018-01-14 07:31 rmaddy

    Yes, both languages support hierarchical inheritance. There are countless examples in the iOS SDK.

    UIResponder is subclasses by UIApplication, UIView, UIViewController.

    UIView obviously has many subclasses as does UIViewController.