coreplot吧点击不工作 [英] coreplot bar tap not working

查看:105
本文介绍了coreplot吧点击不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已从Github下载此代码: https://github.com/gilthonweapps/CorePlotBarChartExample 。如何选择onTap for bar?我使用以下代码:

I have downloaded this code from Github : https://github.com/gilthonweapps/CorePlotBarChartExample .How to get onTap for bar selected ? I am using the following code:

#pragma mark - CPTBarPlotDelegate methods
-(void)barPlot:(CPTBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)index {

     NSLog(@"barWasSelectedAtRecordIndex %d", index);
}

但这不起作用(它没有识别Tap)。请帮忙。
感谢提前和新年快乐。

But this is not working (Its not recognizing the Tap).Please Help. Thanks in Advance and Happy New Year.

推荐答案

设置情节委托到你的条形图委托对象。这通常是视图控制器,但不一定是。

Set the plot delegate to your bar plot delegate object. This is usually the view controller but it does not have to be.

这篇关于coreplot吧点击不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆