I am very new to iPhone development. I often encounter IBAction, IBOutlet and so on when reading Objective-C and Swift code. What does IB stand for?
I am very new to iPhone development. I often encounter IBAction , IBOutlet and
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“Interface Builder”.
Before Xcode 4, the interface files (XIBs and NIBs) were edited in a separate program called Interface Builder, hence the prefix.
IBActionis defined tovoid, andIBOutletto nothing. They are just clues to Interface Builder when parsing files to make them available for connections.Just to add the reference, inside AppKit/NSNibDeclarations.h you’ll find these:
So, actually, code like this:
Will be transformed into:
By the preprocessor, even before the compiler sees it. Those keywords were acting just as clues to Interface Builder.