Should I call [super awakeFromNib]?

前端 未结 3 1106
执念已碎
执念已碎 2020-12-13 12:37

If i implement my own version of awakeFromNib, should I call [super awakeFromNib] at the end of my method?

3条回答
  •  暖寄归人
    2020-12-13 13:38

    Yes you should.

    I implemented drag and drop and everything was working until I added my own awakeFromNib then the drag and drop function whichTypeToProcess never got called.

    It wasn't till I added [super awakeFromNib]; as the last statement in my own awakeFromNib that the drag and drop function whichTypeToProcess was being called again and drag and drop started working again.

    FYI - This was in a MacOSX application.

提交回复
热议问题