How to access IBOutlets declared in superclass?

前端 未结 10 1494
执笔经年
执笔经年 2020-12-30 03:24

I\'m currently refactoring a couple of view controllers that share a few IBOutlets and IBAction methods. I moved the outlet declarations and the

10条回答
  •  执笔经年
    2020-12-30 04:03

    I'm pretty sure that IB only looks at the actual class you're using to find outlets, and not at superclasses. I think that the easiest solution would be to leave the instance variable declarations in the superclass, but duplicate the @property lines in each subclass.

提交回复
热议问题