What is the difference between Highlighted and Selected UIButton's State?

前端 未结 2 1964
谎友^
谎友^ 2020-12-23 17:11

Can anyone tell me What is the difference between Highlighted and Selected state of a UIButton?

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-23 17:44

    According to the documentation:

    Highlighted state of a control. A control enters this state when a touch enters and exits during tracking and when there is a touch up event.

    and

    Selected state of a control. For many controls, this state has no effect on behaviour or appearance. But other subclasses may have different appearance depending on their selected state.

    this is the pure difference between the states.

提交回复
热议问题