zoukankan      html  css  js  c++  java
  • IOS中UIButton和UIImageView的区别

    1、使用场合

    UIImageView:如果仅仅是为了显示图片,不需要监听图片的点击事件

    UIButton:既要显示图片,又要监听图片等点击事件

    2、相同点

    都能显示图片

    3、不同点

    UIButton能处理点击事件,UIImageView不能处理点击事件

    UIButton既能显示图片,又能显示文字

    UIButton能同时显示两张图片,可以在Image和Background属性里面设置图片

    UIButton继承自UIControl,因此默认就能处理事件

    UIImageView继承自UIView,因此默认就不能处理事件

  • 相关阅读:
    Jenkins 插件管理
    持续集成 目录
    gitlab 目录
    jenkins 目录
    POJ 2828
    POJ 2782
    POJ 2725
    POJ 2769
    POJ 2739
    POJ 2707
  • 原文地址:https://www.cnblogs.com/ahao214/p/6107674.html
Copyright © 2011-2022 走看看