The word IBOutlet is not actually defined as anything:
#define IBOutlet
Xcode simply uses the presence of this word in your code to allow you to create connections in Interface Builder. Declaring a variable or property as an IBOutlet :
IBOutlet UIButton * button; @property (...) IBOutlet UIButton * button;
therefore has no direct effect on ARC; he (though perhaps he couldn’t) translate to __weak or something like that. The word itself has completely disappeared from your source by the time the compiler gets it.
On the other hand, the fact that this variable or property is an output has a significant impact on how you need to think about memory management.
Implicit storage identifier for declaring an object variable, for example, IBOutlet UIButton * button; in ARC, __strong , as you said, any object assigned to a variable will be considered “owned”. According to the MRR, a declaration is just a pointer; assignment does not affect the reference count / ownership of the assigned object - it acts in the same way as the assign property. * Thus, the meaning of the same ivar declaration varies between the two management systems.
Objects in xib have an owner / owner relationship, which are formed by the presentation hierarchy; those. parent representations own their subzones. The top-level view in xib belongs to an object known as File Owner. This setting means that, generally speaking, your outputs for objects in xib that are not the top level should be weak (with ARC) or assign (if the property is in MRR). They do not own a relationship; they are essentially handy indexes on the list of views. This is Apple's recommendation :
... you do not need strong references to the objects located below on the chart, because they belong to their parents, and you should minimize the risk of creating strong reference cycles.
[...] The outputs should be weak , except for those that belong to the file owner, for the top-level objects in the nib file (or in iOS, in the storyboard script), which should be strong . Thus, the clips you create should be [sic], usually weak by default ...
Your simple IBOutlet s pointer, as I explained, acted - for memory management purposes - like the weak ** properties, which means they are doing the right thing. The same declaration is probably erroneous when compiling in ARC.
In short: IBOutlet does not translate to weak , but it changes the meaning of the pointer. Since the default memory management semantics is IBOutlet UIButton * button; changes from “assignment” according to the MRR to “owned” in the ARC, and since an IBOutlet usually does not have ownership, the presence of an IBOutlet does imply that the pointer is declared __weak under ARC. †
* And it looks like the weak property - the only difference is that the weak pointers are set to nil when the object is freed.
** Except for auto- nil .
† Or, indeed, it should be a weak property.