As swift 3 says CGRectDivide
is deprecated and the replacement is divided(atDistance: CGFloat, from fromEdge: CGRectEdge) -> (slice: CGRect, remainder: CGRect)
.
As I know CGRectDivide
was dividing a source rectangle into two component rectangles by default.
The questions is what to do and what to use to perform the same operation what CGRectDivide does using swift 3?
Update 1: The swift 2 function looks like:
fileprivate func isLeftPointContainedWithinBezelRect(_ point: CGPoint) -> Bool{
if let bezelWidth = SlideMenuOptions.leftBezelWidth {
var leftBezelRect: CGRect = CGRect.zero
var tempRect: CGRect = CGRect.zero
CGRectDivide(view.bounds, &leftBezelRect, &tempRect, bezelWidth, CGRectEdge.minXEdge)
print("------> slidee1")
return leftBezelRect.contains(point)
} else {
return true
}
}