DGRunkeeperSwitch
DGRunkeeperSwitch copied to clipboard
Update to Swift 4
with swift 4 does not work
@stefanocali If you have crashes on iOS 11 and Swift 4 you should change this line: "addObserver(self, forKeyPath: "selectedBackgroundView.frame", options: .new, context: nil)" on fileprivate "finishInit()" method to this: "addObserver(selectedBackgroundView, forKeyPath: "frame", options: .new, context: nil)". And it will work perfectly.
Also these lines don't compile
tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapped))
panGesture = UIPanGestureRecognizer(target: self, action: #selector(pan))
The funcs 'tapped' and 'pan' require the @objc decoration.
Will update it.
@gontovnik any updates here?
This is fixed by Pull Request #48, which should be merged.
@gontovnik please merge #48 which addresses this.