What use cases are there for defining a new root class?

前端 未结 4 441
傲寒
傲寒 2020-12-10 04:12

We know that in Objective-C there are two main root classes: NSObject and NSProxy. There are other roots (mainly for private and legacy purposes)

4条回答
  •  渐次进展
    2020-12-10 05:13

    Companies like the OmniGroup have defined a version of NSObject to use as their own base class for everything.

    It's essentially a subclass of NSObject with some debug stuff. Other than that, it's usually a terrible idea to fight the framework.

    Find Omni's code here: https://github.com/omnigroup/OmniGroup

提交回复
热议问题