开发者

pressing event in UIButton?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜