如何在ios上观察coreplot中的触摸事件?

发布于 2024-11-02 05:36:01 字数 196 浏览 3 评论 0原文

我将此代码添加到我的 graphViewController 中:

-(BOOL)pointingDeviceDownEvent:(id)event atPoint:(CGPoint)interactionPoint {
    NSLog(@"Touched.");
}

但它不会在触摸时触发。我做错了什么?

I added this code to my graphViewController:

-(BOOL)pointingDeviceDownEvent:(id)event atPoint:(CGPoint)interactionPoint {
    NSLog(@"Touched.");
}

but it is not firing on touch. What am I doing wrong?

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

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

发布评论

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

评论(1

不爱素颜 2024-11-09 05:36:01

我正在使用 CPPlotSpaceDelegate 协议来接收 ios 上的触摸。

设置 defaultPlotSpace 的委托后,当收到触摸时,您将调用以下方法

-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint)point;

-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceCancelledEvent:(id)event;

-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point;

-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point;

i'm using the CPPlotSpaceDelegate protocol to receive touches on ios.

after setting the delegate for your defaultPlotSpace you'll get called on the following methods when touches are received

-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint)point;

-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceCancelledEvent:(id)event;

-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point;

-(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(id)event atPoint:(CGPoint)point;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文