我需要在我的应用程序中添加一个LineChart。我们可以使用Cocoapods。我在Podfile中添加了pod'Charts',用于在我的iOS应用程序中实现Chart。打开工作区xcode要求将项目转换为swift 3.但之后它显示了很多错误(因为swift 2.3的语言转换)到3)。
这些是我遵循的步骤。
在Podfile中添加pod'Charts',安装它然后打开工作区在项目目标的Build阶段添加链接二进制Charts.framework在ViewController中导入Charts
从github我得到了swift 3 pod'SwiftCharts'的解决方案,:git =>'https://github.com/i-schuetz/SwiftCharts.git'
但在我的情况下,这也没有用,我甚至无法为我的View创建一个IBOutlet(在viewcontroller中用于显示图表)。
您可以将此pod用于swift 3.0
use_frameworks!
pod 'SwiftCharts', :git => 'https://github.com/i-schuetz/SwiftCharts.git'