I added Charts through pods in a new project, and it compiles fine. But in the project where I actually need it, I get the attached errors during compilation. Swift Language is set to Swift 4.0 in Build Settings. Deployment Target is 9.0
There is currently no code using the Library, the error occurs after adding the Pod and trying to compile the existing project.
Are there any other settings I have to check regarding these errors?
@objc open lazy var rightYAxisRenderer = YAxisRenderer(viewPortHandler: _viewPortHandler, yAxis: rightAxis, transformer: _rightAxisTransformer)
@objc open lazy var leftYAxisRenderer = YAxisRenderer(viewPortHandler: _viewPortHandler, yAxis: leftAxis, transformer: _leftAxisTransformer)
@objc open lazy var xAxisRenderer = XAxisRenderer(viewPortHandler: _viewPortHandler, xAxis: _xAxis, transformer: _leftAxisTransformer)
Cannot use instance member '_viewPortHandler' within property initializer; property initializers run before 'self' is available
ChartUtils.drawText(context: context, text: value, point: CGPoint(x: xPos, y: yPos), align: align, attributes: [NSAttributedStringKey.font: font, NSAttributedStringKey.foregroundColor: color])
Type 'NSAttributedStringKey' (aka 'NSString') has no member 'font'
Definition of variables
internal var _viewPortHandler: ViewPortHandler
@objc public init(viewPortHandler: ViewPortHandler)
{
_viewPortHandler = viewPortHandler
}