How to access IBOutlets declared in superclass?

前端 未结 10 1527
执笔经年
执笔经年 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:14

    I ran into a similar problem with a superclass, but it was due to a bug in Xcode (8.2) where Interface Builder doesn't show outlets in the Connection Inspector if those outlets have been declared with a _Nullable type annotation for Swift compatibility.

    Using nullable inside @property's parentheses appears to work around the problem.

    This Xcode bug seems to affect outlets in any class (ie. not just superclasses).

提交回复
热议问题