Outlets to UILabel Not Found in XIB even after declaring Outlets in header file
I am developing an iPhone app, and I am the following problem.
I have declared the outlets and properties for UILabel in my header file, but in XIB I am not able to find the outlets for UILabel开发者_StackOverflow社区.
Here is a snippet which shows my header file declaration of IBOutlets for UILabels:
What should I do?
Make sure your NIB's class is set to FirstViewController by opening it on Interface Builder and pressing CMD+4 then checking that the CLASS field is set appropriately.
Put an IBOutlet
directive on your property.
@property(nonatomic,retain) IBOutlet UILabel * test;
Lately, I have been having this problem when I open projects in the "Recent Projects" list when first launching xcode. Opening .xcodeproj file itself restores the links for me.
精彩评论