Reasons for an IBOutlet to be nil

前端 未结 6 1954
滥情空心
滥情空心 2021-01-12 13:44

What are the reasons why an IBOutlet (connected) could be nil?

I have one in may application which is always nil, even if I re

6条回答
  •  我在风中等你
    2021-01-12 14:25

    One reason I just got stung by: If the nib file is not included in the target resource files for some reason (like you had the targets unchecked when you added it to the project), Xcode doesn't throw an error but all the outlets from that nib are going to be null...

提交回复
热议问题