开发者

Outlets to UILabel Not Found in XIB even after declaring Outlets in header file

开发者 https://www.devze.com 2023-01-28 20:58 出处:网络
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开发者

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:

Outlets to UILabel Not Found in XIB even after declaring Outlets in header file

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号