简体   繁体   中英

IBoutlet , 2 Different ways to Write?

I am new to iPhone OS App development. Can somebody explain whats the difference between


IBOutlet UIButton *myButton;

@property (nonatomic, retain) IBOutlet UIButton *myButton;

As far i understand the first line was used earlier and now we can use the 2nd line. Theres absolutely no need to write both of them. Any idea?

Taimur

Apple现在建议您仅将IBOutlet声明放在@property

I just write IBOutlet in the @property declaration. It won't hurt to put it in both spots though.

You're not asking the difference between the whole lines though are you?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM