【问题标题】:SwiftChart Library not working with Swift 3.0SwiftChart 库不适用于 Swift 3.0
【发布时间】:2016-09-10 08:01:08
【问题描述】:

我使用SwiftChart 来实现如下图 的折线图和面积图。

它适用于 Xcode 7.3。现在正在将我的代码移植到 iOS 10,以便将代码转换为 Swift 3.0。我收到以下错误:

U

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 这个月已经更新到最新的 Swift / Xcode——你还有这个问题吗?
  • 会检查并通知您

标签: ios swift swift3 swiftcharts


【解决方案1】:

SwiftChart 的最新更新修复了上述问题。请将您的 swift 图表库代码更新为最新的

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-03
    • 2010-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多