Best way of preventing other programmers from calling -init

后端 未结 5 1967
醉梦人生
醉梦人生 2020-12-23 11:43

When designing a class hierarchy, sometimes the subclass has added a new initWithSomeNewParam method, and it would be desirable to disable calls to the old

5条回答
  •  [愿得一人]
    2020-12-23 12:19

    Flag it deprecated? Developers will be developers, you can't stop us all! ;-)

    How do I flag a method as deprecated in Objective-C 2.0?

提交回复
热议问题