ios中的UIButton和UIImageView异同点

UIImageView和UIButton
1>>> 使用场合
* UIImageView: 如果只是需要显示图片,不需要监听图片的点击
* UIButton: 既要显示图片,又要监听图片的点击

2>>>相同:能显示图片

3>>> 不同点
* UIButton能处理点击事件, UIImageView不能处理点击事件
* UIButton既能显示图片, 又能显示文字
* UIButton能同时显示两张图片
* UIButton继承自UIControl, 因此默认就能处理事件
* UIImageView继承自UIView, 因此默认就不能处理事件

posted @ 2016-05-13 10:35  灰色有点白  阅读(150)  评论(0编辑  收藏  举报