开发者

Trigger Shake Event in iOS SDK programatically

Is it possible to trigger the shake programatically? I am using th开发者_运维百科e undo manager in my iOS app and its working fine when I shake the device. In addition, I would like to be able to provide a UIButton, so a user can trigger the undo manager without actually shaking the device.

Is this possible?

Thanks for any help,


I believe you can just call the -undo method on an instance of NSUndoManager, so set your button up to trigger that.

In addition, this tutorial may be helpful. It sets up an undo button as well as allowing shake to undo.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜