how to block a superclass method to be called to a subclass

后端 未结 5 1707
情歌与酒
情歌与酒 2021-01-19 03:37

I\'m extending the functionality of a class with a subclass, and I\'m doing some dirty stuff that make superclass methods dangerous (app will hang in a loop) in the context

5条回答
  •  一向
    一向 (楼主)
    2021-01-19 03:51

    If you create the methods in your superclass as "private" then the subclass has no possible way of calling them. I'm not familiar with Objective C, but every other object oriented language I've seen has the "private" qualifier.

提交回复
热议问题