Hey, I'm trying to use scatter plot and while creating a point object it's showing me error the initializer is inaccessible. init needs to be public.
public init( x: CGFloat, y: CGFloat, weight : CGFloat = 0.5 ){
self.location = CGPoint(x: x, y: y)
self.weight = weight
}
public init(point: CGPoint) {
self.init(x: point.x, y: point.y)
}
@State var points:[Point] = []
points.append(Point(x: 2.0, y: 3.0))