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

414 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 answers

1
ObjectiveC-oder 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];