【问题标题】:Core Plot - iOS Touched Event is difficult to select point on graph核心情节 - iOS 触摸事件很难在图表上选择点
【发布时间】:2012-03-12 20:24:46
【问题描述】:

使用此功能

- (void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index 

我可以为选定的点添加注释,尽管在 iPad 或 iPhone 上用手指选择图表上的一个点很困难。有没有办法让这个功能对指点设备而不是鼠标更宽容?

【问题讨论】:

    标签: ios select core-plot point scatter-plot


    【解决方案1】:

    在散点图上使用plotSymbolMarginForHitDetection 属性。这定义了距绘图点中心的距离,以像素为单位,触摸仍将在该处注册。

    【讨论】:

    • 是的,这很完美。谢谢。您有没有想过 iPhone 的最佳点范围是多少? my gist for ipad 看起来 10.0f 还不错。
    • 10.0 对我来说听起来很合理。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-20
    • 2011-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多