How to use custom UITableViewCell from Interface Builder?

后端 未结 3 1816
耶瑟儿~
耶瑟儿~ 2021-01-13 06:11

I want to be able to design my own UITableViewCell in IB. But I keep getting a null ref exception when trying to access the label I defined in IB.

Here\'s what I\'m

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-13 06:44

    You can not reference any outlets until the Nib is loaded. There is a method that you can override that will tell you "Your NIB is loaded, you can now access the fields". Until that point, referencing those objects will always return null.

提交回复
热议问题