开发者

How to associate an action to a keyboard shortcut?

开发者 https://www.devze.com 2022-12-10 22:13 出处:网络
I\'ve an IBAction that calls up a pa开发者_开发技巧nel. I want to invoke that action with a keyboard shortcut but I\'m at a loss on how to do it.

I've an IBAction that calls up a pa开发者_开发技巧nel. I want to invoke that action with a keyboard shortcut but I'm at a loss on how to do it.

I guess one way of doing it would be to create a menu item, associate the action to the item and then assign the shortcut to that item, but I haven't done my menus yet.

Any ideas or suggestions?


I guess one way of doing it would be to create a menu item, associate the action to the item and then assign the shortcut to that item, but I haven't done my menus yet.

I think you anwered the question yourself :)
Just create a UI Element in Interface Builder that's supposed to start your Action and assign an Key Equivalent.

0

精彩评论

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