0
我使用iOS Charts與斯威夫特3.iOS的圖表:上
chartValueSelected()確定圈位置當上我的圖上的圓圈/點用戶點擊,我想證明具有價值和彈出窗口日期。
我發現裏面chartValueSelected()
點擊和展示這樣的彈出:
func chartValueSelected(_ chartView: ChartViewBase, entry: ChartDataEntry, highlight: Highlight) {
//Set and show the popup...
//...
self.presentViewController(vc, asPopoverRelativeTo: frame, of: graph, preferredEdge: .minY, behavior: .transient)
}
現在我只是frame
定位彈出隨意,因爲我不知道如何確定在哪裏用戶點擊。
有沒有辦法知道點擊圓的位置的x/y座標?