簡體   English   中英

SwiftChart庫不適用於Swift 3.0

[英]SwiftChart Library not working with Swift 3.0

我已經使用SwiftChart來實現折線圖和面積圖,如下圖所示 折線圖區域

它與Xcode 7.3正常工作。 現在正在將我的代碼移植到iOS 10,以便將代碼轉換為Swift 3.0。 我收到以下錯誤:

ü

CGPathMoveToPoint(area, nil, CGFloat(xValues[0]), zero)

for i in 0..<xValues.count {
    CGPathAddLineToPoint(area, nil, CGFloat(xValues[i]), CGFloat(yValues[i]))
}

CGPathAddLineToPoint(area, nil, CGFloat(xValues.last!), zero)

if labels[i] != 0 {
    // Horizontal grid for 0 is not dashed\
    CGContextSetLineDash(context,phase:0,lengths:[5],count:1)
   // CGContextSetLineDash(context, 0, [5], 1)
} else {
    CGContextSetLineDash(context, 0, nil, 0)
}

請幫助我解決此問題

SwiftChart的最新更新解決了上述問題。 請更新您的快速圖表庫代碼為最新

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM