Open gbertb opened 9 years ago
It's straightforward to use it in Swift. Declare a property in your VC:
var volumeButtonHandler: JPSVolumeButtonHandler?
in viewDidLoad()
set the property with the 2 blocks:
let block = { () -> Void in doSomething }
volumeButtonHandler = JPSVolumeButtonHandler(upBlock: block, downBlock: block)
Take a look on PhysicalButton
Would love to see how this can be implemented in swift