After converting code to latest swift 3.0 I am shown this error.
Also tell me solution for CGSize = CGSizeMake(0,0)
static var frameAtStartOfPan: CGRect = CGRectZero
static var startPointOfPan: CGPoint = CGPointZero
Which is also unavailable.
Try the following:
This is for the swift's latest version
CGRect
Can be simply created using an instance of aCGPoint
orCGSize
, thats given below.Or if we want to specify each value in
CGFloat
orDouble
orInt
, we can use this method.CGPoint
Can be created like this.CGSize
Can be created like this.Also size and point with 0 as the values, it can be done like this.
CGRectZero
&CGPointZero
replaced withCGRect.zero
&CGPoint.zero
inSwift 3.0
.Swift 3 Bonus: Why didn't anyone mention the short form?
.zero
instead ofCGPoint.zero
When the type is defined, you can safely omit it.