Commit fd450c65 by Daniel Dahan

minor cleanups

parent 18dcbf6c
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
import UIKit import UIKit
public class BarView : ControlView { public class BarView: ControlView {
/** /**
An initializer that initializes the object with a NSCoder object. An initializer that initializes the object with a NSCoder object.
- Parameter aDecoder: A NSCoder instance. - Parameter aDecoder: A NSCoder instance.
......
...@@ -60,12 +60,12 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD ...@@ -60,12 +60,12 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
public override func viewWillAppear(_ animated: Bool) { public override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
if let v: UIGestureRecognizer = interactivePopGestureRecognizer { if let v = interactivePopGestureRecognizer {
if let x: NavigationDrawerController = navigationDrawerController { if let x = navigationDrawerController {
if let l: UIPanGestureRecognizer = x.leftPanGesture { if let l = x.leftPanGesture {
l.require(toFail: v) l.require(toFail: v)
} }
if let r: UIPanGestureRecognizer = x.rightPanGesture { if let r = x.rightPanGesture {
r.require(toFail: v) r.require(toFail: v)
} }
} }
...@@ -80,8 +80,8 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD ...@@ -80,8 +80,8 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
public override func viewDidAppear(_ animated: Bool) { public override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated) super.viewDidAppear(animated)
// Load the initial topItem. // Load the initial topItem.
if let v: NavigationBar = navigationBar as? NavigationBar { if let v = navigationBar as? NavigationBar {
if let item: UINavigationItem = v.topItem { if let item = v.topItem {
v.layoutNavigationItem(item: item) v.layoutNavigationItem(item: item)
} }
} }
...@@ -107,14 +107,14 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD ...@@ -107,14 +107,14 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
True is yes, false is no. True is yes, false is no.
*/ */
public func navigationBar(navigationBar: UINavigationBar, shouldPushItem item: UINavigationItem) -> Bool { public func navigationBar(navigationBar: UINavigationBar, shouldPushItem item: UINavigationItem) -> Bool {
if let v: NavigationBar = navigationBar as? NavigationBar { if let v = navigationBar as? NavigationBar {
let backButton: IconButton = IconButton() let backButton = IconButton()
backButton.pulseColor = Color.white backButton.pulseColor = Color.white
backButton.setImage(v.backButtonImage, for: .normal) backButton.setImage(v.backButtonImage, for: .normal)
backButton.setImage(v.backButtonImage, for: .highlighted) backButton.setImage(v.backButtonImage, for: .highlighted)
backButton.addTarget(self, action: #selector(handleBackButton), for: .touchUpInside) backButton.addTarget(self, action: #selector(handleBackButton), for: .touchUpInside)
if var c: Array<UIControl> = item.leftControls { if var c = item.leftControls {
c.append(backButton) c.append(backButton)
item.leftControls = c item.leftControls = c
} else { } else {
...@@ -144,7 +144,7 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD ...@@ -144,7 +144,7 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
view.contentScaleFactor = Device.scale view.contentScaleFactor = Device.scale
// This ensures the panning gesture is available when going back between views. // This ensures the panning gesture is available when going back between views.
if let v: UIGestureRecognizer = interactivePopGestureRecognizer { if let v = interactivePopGestureRecognizer {
v.isEnabled = true v.isEnabled = true
v.delegate = self v.delegate = self
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
import UIKit import UIKit
@IBDesignable @IBDesignable
public class RootController : UIViewController { public class RootController: UIViewController {
/// Device status bar style. /// Device status bar style.
public var statusBarStyle: UIStatusBarStyle { public var statusBarStyle: UIStatusBarStyle {
get { get {
......
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