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?
Asked
Active
Viewed 408 times
1 Answers
2
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];

ObjectiveC-oder
- 342
- 1
- 5
-
Thanks. Found a similar solution here: http://www.shinobicontrols.com/forum/shinobicontrols/2013/9/programmatically-showing-chart-crosshair-43-tooltip/ – cbartel Dec 06 '13 at 16:40