DGRunkeeperSwitch icon indicating copy to clipboard operation
DGRunkeeperSwitch copied to clipboard

Update to Swift 4

Open stefanocali opened this issue 7 years ago • 6 comments

with swift 4 does not work

stefanocali avatar Sep 21 '17 15:09 stefanocali

@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.

kleber11 avatar Sep 25 '17 12:09 kleber11

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.

phoney avatar Sep 26 '17 17:09 phoney

Will update it.

gontovnik avatar Oct 24 '17 16:10 gontovnik

@gontovnik any updates here?

shardul89 avatar Dec 22 '17 12:12 shardul89

This is fixed by Pull Request #48, which should be merged.

phoney avatar Dec 25 '17 00:12 phoney

@gontovnik please merge #48 which addresses this.

AndriyGo avatar May 28 '18 00:05 AndriyGo