You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm initialising an XYPieChart inside "cellForRowAtIndexPath", and I have a property for the Pie Chart in the viewController that contains the UITableView (and is also its DataSource and Delegate).
The viewController is the Pie Chart's delegate, and is adhering to its protocol correctly - the chart itself is displaying perfectly. The chart, table cell, table and containing view all have user interaction enabled.
However, neither the didSelect, or willSelectSliceAtIndex methods are ever performed. Has anyone had any similar experience of this?
The text was updated successfully, but these errors were encountered:
I have encountered the same problem , then i dig XYPieChart class . Actually When using in UITableView Or UIScrollView the touch events for XYPieChart has been canceled by their touch events . So basically we have to pass touch event to our XYPieChart instant .
I created a custom cell in which i pass the touch event like this :
Now its working fine :)
-(void)touchesEnded:(NSSet )touches withEvent:(UIEvent *)event
{
UITouch *touch = [[event allTouches] anyObject];
if (CGRectContainsPoint([self.backgroundView frame], [touch locationInView:self])){
/ Added this to resolve the issue
* [super touchesCancelled:touches withEvent:nil]; /
}
else if (CGRectContainsPoint([self.contentView frame], [touch locationInView:self])) {
[self.pieChartView touchesEnded:touches withEvent:event];
}
else{
/ Added this to resolve the issue
* [super touchesCancelled:touches withEvent:nil];
*/
}
I'm initialising an XYPieChart inside "cellForRowAtIndexPath", and I have a property for the Pie Chart in the viewController that contains the UITableView (and is also its DataSource and Delegate).
The viewController is the Pie Chart's delegate, and is adhering to its protocol correctly - the chart itself is displaying perfectly. The chart, table cell, table and containing view all have user interaction enabled.
However, neither the didSelect, or willSelectSliceAtIndex methods are ever performed. Has anyone had any similar experience of this?
The text was updated successfully, but these errors were encountered: