开发者

how to check is a button still pressed (clicked) or not?

开发者 https://www.devze.com 2023-01-25 18:50 出处:网络
I need to know the state of the bu开发者_如何学JAVAtton at this time if clicked or not? thanksif (myButton.state & UIControlStateHighlighted) {

I need to know the state of the bu开发者_如何学JAVAtton at this time if clicked or not ?

thanks


if (myButton.state & UIControlStateHighlighted) {
   // Do your stuff the user is currently holding down her finger…
}


take a look at the state property of your UIButton. You're interested in UIControlStateHighlighted.

0

精彩评论

暂无评论...
验证码 换一张
取 消