我们需要在Swift 3中使用哪个Pod来实现iOS中的图表?

问题描述 投票:0回答:1

我需要在我的应用程序中添加一个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中用于显示图表)。

charts cocoapods swift3 ios10 xcode8
1个回答
1
投票

您可以将此pod用于swift 3.0

use_frameworks!
pod 'SwiftCharts', :git => 'https://github.com/i-schuetz/SwiftCharts.git'
© www.soinside.com 2019 - 2024. All rights reserved.