Commit f42f9356 by Daniel Dahan

development: removed non-optional checks in a guard statement

parent e773c782
......@@ -25,9 +25,9 @@ The first version of Material was to bring Material Design to iOS. We considered
- [x] TabBar
- [x] PageTabBar
- [X] SearchBar
- [x] NavigationBar
- [x] BottomNavigationBar
- [x] NavigationController
- [x] NavigationDrawer
- [x] BottomNavigationBar
- [x] Example Projects
- [x] And More...
......
......@@ -395,10 +395,8 @@ open class Switch: UIControl {
return
}
guard let q: CGFloat = max(min(sender.x + v.location(in: sender).x - v.previousLocation(in: sender).x, onPosition), offPosition) else {
return
}
let q: CGFloat = max(min(sender.x + v.location(in: sender).x - v.previousLocation(in: sender).x, onPosition), offPosition)
guard q != sender.x else {
return
}
......@@ -432,7 +430,7 @@ open class Switch: UIControl {
/// Reloads the view.
open func reload() {
var w: CGFloat = intrinsicContentSize.width
let w: CGFloat = intrinsicContentSize.width
let px: CGFloat = (width - w) / 2
track.frame = CGRect(x: px, y: (height - trackThickness) / 2, width: w, height: trackThickness)
......
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