Reasons for an IBOutlet to be nil
问题 What are the reasons why an IBOutlet (connected) could be nil ? I have one in may application which is always nil , even if I recreate everything from scratch (declaration and control). 回答1: It could be that your nib is messed up, but I find a common reason is having two instances where you think you only have one, and the one you're using in your code is not the one you connected. 回答2: If you've also defined a loadView method that creates the view, it is possible based on how you initialize