开发者

pressing event in UIButton?

开发者 https://www.devze.com 2022-12-08 04:08 出处:网络
when i am pressing my UIButton ,(i did not release my mouse button),i want to change title? i tried touchupinside throughXIB.but it was called after i released my mouse button.

when i am pressing my UIButton ,(i did not release my mouse button),i want to change title? i tried touchupinside through XIB.but it was called after i released my mouse button. i tried both land also all states....? [sButton setTitle:@"hai" forState:UICo开发者_Python百科ntrolStateNormal]; [sButton setTitle:@"hai" forState:UIControlStateHighlighted];


The Control Events documentation will list all of the events you can subscribe to for controls (in this case, your UIButton). The one you want is UIControlEventTouchDown. But the problem with your requirement is that pushing the button covers the screen with the user's finger and I wonder whether changing the title will really be beneficial.

0

精彩评论

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