NSUndoManager 是否可以在 iPhone 上运行而无需摇动手势?

发布于 2024-09-13 21:34:06 字数 233 浏览 2 评论 0原文

我有一个应用程序,除了撤消之外,还可以使用摇动手势执行其他操作。我想使用 NSUndoManager ,所有示例和操作方法都说我必须将以下行放入我的 applicationDidFinishLaunching 方法中。

application.applicationSupportsShakeToEdit = YES;

是否可以使用 NSUndoManager 而不支持摇动撤消手势?

I have an app that uses the shake gesture for something else besides undo. I want to use NSUndoManager and all the examples and how-tos say I have to put the following line in my applicationDidFinishLaunching method.

application.applicationSupportsShakeToEdit = YES;

Is it possible to use NSUndoManager without supporting the shake to undo gesture?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少钕鈤記 2024-09-20 21:34:06

当然。创建一个撤消按钮,然后:

- (IBAction)undoButtonPressed {
    [myUndoManager undo];
}

Sure. Create an Undo button, then:

- (IBAction)undoButtonPressed {
    [myUndoManager undo];
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文