JPSVolumeButtonHandler
JPSVolumeButtonHandler copied to clipboard
any swift examples?
Would love to see how this can be implemented in swift
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