ios - 如何创建一个按钮,突出显示散点图中的下一个点? ios

标签 ios button highlight point scatter-plot

我想创建一个按钮,突出显示散点图中当前突出显示的点之后的下一个点。

我应该在按钮的 addTarget 中调用方法 -(void)scatterPlot:(CPTScatterPlot *)plotplotSymbolWasSelectedAtRecordIndex:(NSUInteger)index 吗?或者有什么解决办法?

我尝试这样做,但它不起作用。我收到此错误“NSInvalidArgumentException”,原因:“-[GraficViewController scatterPlot:aaplPlot:plotSymbolWasSelectedAtRecordIndex:ind:]:无法识别的选择器发送到实例 0x2c2e80”。

UIButton * button = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 100, 50)];
[button setImage:[UIImage imageNamed:@"grafic-info-button.png"] forState:UIControlStateNormal];
[self.view addSubview:button];
int ind = selectedIndex + 1;
[button addTarget:self action:@selector(symbolforScatterPlot:aaplPlot: recordIndex:ind:) forControlEvents:UIControlEventTouchUpInside];

最佳答案

在选择器按钮列表器上,使用 Core Plot 添加分散突出显示选项。

关于ios - 如何创建一个按钮,突出显示散点图中的下一个点? ios,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15739824/

相关文章:

android - 如何将点击监听器添加到我的回收站 View (Android kotlin)

emacs - 字体锁定的替代方案

c# - C# 中菜单的默认突出显示颜色是什么?

ios - 从 Xamarin 中的自定义 UITableViewController 调用 UITableViewController 中的方法

ios - NotSupportedException get_HasShutdownStarted - “il2cpp 不支持此 icall

ios - Swift 中的 JSON 复杂数组

html - Drupal:页面上的 HTML 按钮以匹配主题

ios - 标签中的图片(Swift)

javascript - 单击时页面自动刷新

jquery 高亮搜索以空格分隔的多个单词