(1) Similarities of UIButton and Uiimageview
can display pictures.
(2) different points of UIButton and Uiimageview
-The former can not only display pictures but also listen to events (there is Addtarget method)
The former can not only show the picture but also show two pictures (SetImage and setbackgroundimage two methods)
The former can not only display the picture but also display the text (that is, the Settitle method)
(3) Use occasions
--If you just show a picture no other flower head, then use Uiimageview
-If there are other, then ...
Because if only for the display of pictures, UIButton control compared to the Uiimageview control will be more memory, after all, UIButton function, like a package, although it is an empty package, but the package itself is very large, then it will certainly be relatively heavy.
(4) deep-seated reasons.
--uibutton inherited from Uicontrol,uicontrol inherited from UIView
--uiimageview directly inherit from UIView
(5) Summary
--the control that inherits from Uicontrol has the Addtarget method, because this method is Uicontrol, inherits from it, of course this method also inherits, actually UIButton call this method to call its parent class namely Uicontrol.
--If you want to see if a control supports event monitoring, then long cmd+ Click to see if it inherits from Uicontrol, such as UISlider.
iOS Dev 46 uses the UIButton and Uiimageview differences to distinguish which controls have Addtarget listener events this method