How to decrease the long press duration to show the crosshair for Shinobi iOS SDK?

426 Views Asked by At

I would like to make it easier for the user to show/hide the crosshair on the chart. How do I decrease the long press duration?

1

There are 1 best solutions below

1
On BEST ANSWER

Something like this should do the trick:

#import "SChartCanvas.h"
#import "SChartCanvasOverlay.h"

@interface SChartCanvasOverlay (LongPress)
- (void) changeLongPressDelay:(CFTimeInterval)time;
@end

@implementation SChartCanvasOverlay(LongPress)

- (void) changeLongPressDelay:(CFTimeInterval)time
{
    [longPressGesture setMinimumPressDuration: time];
}

@end

The methods above should allow you to change the delay time on the long press like this:

[chart.canvas.overlay changeLongPressDelay:0.2];