IBOutlet instances are (null) after loading from NIB

前端 未结 5 1984
太阳男子
太阳男子 2021-02-18 22:30

I am working on an iPhone app and am getting (null) references to IBOutlet fields in my controller. I have a UIViewController subclass that is set as the File\'s Owner in my XIB

5条回答
  •  萌比男神i
    2021-02-18 22:56

    Another potential cause of a null IBOutlet pointer is forgetting to save the xib file in Interface Builder after creating the outlet connection.

提交回复
热议问题