开发者

How to send Event to Control in Iphone?

开发者 https://www.devze.com 2023-01-02 20:37 出处:网络
For example, if i\'d like to imitate UIControlEventTouchUpInside for Button1, when Button2 was clicked?

For example, if i'd like to imitate UIControlEventTouchUpInside for Button1, when Button2 was clicked? The reason why it isn't enough to addTarget: act开发者_运维问答ion:@selector() forControlEvents - is that it's necessary to get default highlight for example (glow effect)


Interesting question, +1. I'm still learning & love questions on here that encourage me to go digging around for useful info.

And... here is a cool Cocoa with Love post about how to synthesize a touch event on the iPhone. You can do that at the co-ords of Button1 when you get the touchUpInside from Button2.

0

精彩评论

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

关注公众号