This question is locked. New answers and comments are not allowed.
Hi Telerik,
I have downloaded the latest version of iOS UI and I am using it with Swift. I am handling various gesture recognizers and the following is an example for the left swipe:
let leftSwipeGesture = UISwipeGestureRecognizer(target: self, action: Selector("handleLeftSwipe:"))
leftSwipeGesture.direction = UISwipeGestureRecognizerDirection.Left
It works fine. However, when I add a chart to the view controller, none of the gesture recognizers is triggering. Is this the expected behavior? If yes, are there workarounds? Here is how I add the chart to the view controller:
TKChart chart = TKChart(frame: CGRectInset(self.view.bounds, 10, 10))
self.view.addSubview(chart!)
var items:NSMutableArray = []
for x in 0...10 {
var y = 100.0 * sin(M_PI * CDouble(x) + 100.0)
items.addObject(TKChartDataPoint(x:CDouble(x + x * 3), y:y))
}
var series = TKChartSplineSeries(items:items)
series.yAxis = TKChartNumericAxis(minimum:-100, andMaximum:100)
var xAxis = TKChartNumericAxis(minimum:0, andMaximum:20)
xAxis.majorTickInterval = 5
series.xAxis = xAxis
chart!.addSeries(series)
Thanks.
Alex
I have downloaded the latest version of iOS UI and I am using it with Swift. I am handling various gesture recognizers and the following is an example for the left swipe:
let leftSwipeGesture = UISwipeGestureRecognizer(target: self, action: Selector("handleLeftSwipe:"))
leftSwipeGesture.direction = UISwipeGestureRecognizerDirection.Left
It works fine. However, when I add a chart to the view controller, none of the gesture recognizers is triggering. Is this the expected behavior? If yes, are there workarounds? Here is how I add the chart to the view controller:
TKChart chart = TKChart(frame: CGRectInset(self.view.bounds, 10, 10))
self.view.addSubview(chart!)
var items:NSMutableArray = []
for x in 0...10 {
var y = 100.0 * sin(M_PI * CDouble(x) + 100.0)
items.addObject(TKChartDataPoint(x:CDouble(x + x * 3), y:y))
}
var series = TKChartSplineSeries(items:items)
series.yAxis = TKChartNumericAxis(minimum:-100, andMaximum:100)
var xAxis = TKChartNumericAxis(minimum:0, andMaximum:20)
xAxis.majorTickInterval = 5
series.xAxis = xAxis
chart!.addSeries(series)
Thanks.
Alex