iphone - IBOutlet keyword strictly required? -


i pretty new iphone programming therefore apologize if question result trivial or obscure.

in many examples , tutorials have seen in declaration of outlets within xcode (interface section of view controller) keyword "iboutlet" used or not, in conjunction class outlet belongs to, apparently without relevant difference.

e.g.

iboutlet uibutton * mybutton; 

or

uibutton *mybutton; 

i have seen myself in experiments both ways seem work same (provided in both cases set proper connections in ib, , declare property , synthesize it)

anyone tell me if there relevant difference , different behavior between 2 statements?

thank you

iboutlet defined following way:

#define iboutlet 

so has no impact on running code, , purpose allow interface builder automatically determine while parsing class header. without iboutlet keyword in header need declare in ib inspector's identity tab make avaliable connected interface elements.


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -