Iboutlet UILabel *label;
This label is connected to a Uilabel in Interface builder. At this point, the label's Retaincount is 2.
Therefore, if you use the Iboutlet variable, you must release the variable in Dealloc or Viewdidunload.
Fields or methods modified with Iboutlet and ibaction are related to Interfacebuilder.
Iboutlet modified fields can be associated with the corresponding controls in the Interfacebuilder;
The Ibaction modified method can be associated with the corresponding action of the control in the Interfacebuilder.
Iboutlet is only a token for the compiler, which means that the compiler ignores the keyword.
Interface Builder is based on Iboutlet to find member variables that can be manipulated in the builder.
It is important to note that any member variable that is declared as Iboutlet and connected to a UI component in Interface Builder will be retain for an additional time.
-(ibaction) Button_Click: (ID) sender;
Here sender refers to the current control, so that it is not only a button corresponding to an action, but also can have multiple buttons corresponding to the same action.
Iboutlet is a pointer to a control in the Xib file, and Ibaction is the action of a control in the Xib file.
Use CTRL + Mouse to drag and drop connections
Iboutlet & Ibaction