开发者

Set a selector for "setDoubleAction" through "Interface Builder"?

开发者 https://www.devze.com 2023-01-24 10:15 出处:网络
Is it possible to set a selector fo开发者_如何转开发r \"setDoubleAction\" through\"Interface Builder\" or it can only be done by \"XCode\"?

Is it possible to set a selector fo开发者_如何转开发r "setDoubleAction" through "Interface Builder" or it can only be done by "XCode"?

If it can be done only by "XCode" I would like to know why.

Thanks!


In IB, you set the target and single-click action at the same time. There is no way to separately set the double-click action.

You can set it using a Binding, providing you can get to the intended target that way, but this is a bit like swatting a fly with a hydraulic hammer.

The easiest way is just to set it in code.

(What editor you use has nothing to do with it.)

0

精彩评论

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