This is a migrated thread and some comments may be shown as answers.

SideDrawer blocking touch events to subviews

4 Answers 70 Views
SideDrawer
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Armando
Top achievements
Rank 1
Armando asked on 17 Nov 2015, 10:46 AM

I have a ViewController that has a TKChart (a line area series) with the trackball enabled. When i add a SideDrawer to this ViewController i can no longer use the trackball since the SideDrawer is getting all the touch events even when it is hidden. Is there a way to configure the SideDrawer to pass the touch events to the other subviews?.

 Thanks.

4 Answers, 1 is accepted

Sort by
0
Adrian
Telerik team
answered on 17 Nov 2015, 04:32 PM
Hi, Armando,

Thank you for contacting us.

To use the chart's trackball and also have a TKSideDrawer in the view controller you should create a TKSideDrawerView which has a mainView property. You should use the mainView as a parent view for the content below the side drawer. This way the gestures should work as desired. Please consider the code snippet below:
_sideDrawerView = [[TKSideDrawerView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:_sideDrawerView];
     
_chart = [[TKChart alloc] initWithFrame:self.view.bounds];
[_sideDrawerView.mainView addSubview:_chart];

I hope this helps. Should you have further questions, do not hesitate to contact us.

Regards,
Adrian
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Armando
Top achievements
Rank 1
answered on 17 Nov 2015, 07:37 PM
Thank you this solved my problem.
0
Adrian
Telerik team
answered on 18 Nov 2015, 08:23 AM
Hi, Armando,

I am glad that I could help. In case you need further assistance, do not hesitate to write again.

Regards,
Adrian
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sam
Top achievements
Rank 2
answered on 14 Feb 2016, 06:21 PM

Thanks! Had this same problem as well. For noobs like myself this is what I did in swift based off of Adrians answer:

self.sideDrawerView = TKSideDrawerView(frame: self.view.bounds)self.view!.addSubview(sideDrawerView)
self.chart = TKChart(frame: self.view.bounds)
sideDrawerView!.mainView.addSubview(chart)

Tags
SideDrawer
Asked by
Armando
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Armando
Top achievements
Rank 1
Sam
Top achievements
Rank 2
Share this question
or