I am just trying to use the ceil
or round
functions in Swift but am getting a compile time error:
Ambiguous reference to member 'ceil'.
I have already imported the Foundation
and UIKit
modules. I have tried to compile it with and without the import
statements but no luck. Does anyone one have any idea what I am doing wrong?
my code is as follow;
import UIKit
@IBDesignable class LineGraphView: GraphView {
override func setMaxYAxis() {
self.maxYAxis = ceil(yAxisValue.maxElement())
}
}