Commit 23212a21 by adamdahan

issue-21: code review

parent fc270570
...@@ -1172,32 +1172,28 @@ public class SideNavController: UIViewController, UIGestureRecognizerDelegate { ...@@ -1172,32 +1172,28 @@ public class SideNavController: UIViewController, UIGestureRecognizerDelegate {
// :name: isLeftPointContainedWithinRect // :name: isLeftPointContainedWithinRect
// //
private func isLeftPointContainedWithinRect(point: CGPoint) -> Bool { private func isLeftPointContainedWithinRect(point: CGPoint) -> Bool {
let r = CGRectMake(0.0, 0.0, options.leftBezelWidth, view.bounds.size.height) return CGRectContainsPoint(CGRectMake(0, 0, options.leftBezelWidth, view.bounds.size.height), point)
return CGRectContainsPoint(r, point)
} }
// //
// :name: isRightPointContainedWithinRect // :name: isRightPointContainedWithinRect
// //
private func isRightPointContainedWithinRect(point: CGPoint) -> Bool { private func isRightPointContainedWithinRect(point: CGPoint) -> Bool {
let r = CGRectMake(CGRectGetMaxX(view.bounds) - options.rightBezelWidth, 0.0, options.rightBezelWidth, view.bounds.size.height) return CGRectContainsPoint(CGRectMake(CGRectGetMaxX(view.bounds) - options.rightBezelWidth, 0, options.rightBezelWidth, view.bounds.size.height), point)
return CGRectContainsPoint(r, point)
} }
// //
// :name: isBottomPointContainedWithinRect // :name: isBottomPointContainedWithinRect
// //
private func isBottomPointContainedWithinRect(point: CGPoint) -> Bool { private func isBottomPointContainedWithinRect(point: CGPoint) -> Bool {
let r = CGRectMake(0.0, CGRectGetMaxY(view.bounds) - options.bottomBezelHeight, view.bounds.size.width, options.bottomBezelHeight) return CGRectContainsPoint(CGRectMake(0, CGRectGetMaxY(view.bounds) - options.bottomBezelHeight, view.bounds.size.width, options.bottomBezelHeight), point)
return CGRectContainsPoint(r, point)
} }
// //
// :name: isTopPointContainedWithinRect // :name: isTopPointContainedWithinRect
// //
private func isTopPointContainedWithinRect(point: CGPoint) -> Bool { private func isTopPointContainedWithinRect(point: CGPoint) -> Bool {
let r = CGRectMake(0.0, 0.0, view.bounds.size.width, options.topBezelHeight) return CGRectContainsPoint(CGRectMake(0, 0, view.bounds.size.width, options.topBezelHeight), point)
return CGRectContainsPoint(r, point)
} }
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment