Dynamically change an object's superclass

前端 未结 2 1811
旧巷少年郎
旧巷少年郎 2020-12-09 21:31

Is it possible to change an object\'s superclass at runtime? If so, how?

2条回答
  •  有刺的猬
    2020-12-09 22:29

    It is definitely possible using ObjC runtime, but it will be a bit hairy... This is a link to Apple's docs: Objective-C Runtime and an example of its usage: Objective-C Runtime Programming.

提交回复
热议问题