开发者

Cannot see my label outlet when draging file owner in Interface builder

开发者 https://www.devze.com 2023-01-16 08:24 出处:网络
I have this in my .h controller @interface helloViewController : UIViewController { IBOutlet UIlabel *label;

I have this in my .h controller

@interface helloViewController : UIViewController {
    IBOutlet UIlabel *label;

}

-(IBAction)hello:sender(id);

@end

I opened the corresponding .xib file and I c开发者_开发百科ould drag and associate the button -hello to the file owner but trying to associate the label doesn't work: it suggests me to associate -view outlet instead why ?


Your method declaration should be:

-(IBAction)hello:(id)sender;

Also, UILabel needs a capital L

IBOutlet UILabel *label
0

精彩评论

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