Latest 0.1.0
Homepage https://github.com/sieroshtan/VolumeButtonHandler
License MIT
Platforms ios 10.0, requires ARC
Authors

VolumeButtonHandler

Description

A simple handler that detects the pressing of up/down buttons on iOS devices.

Features:

  • Volume button presses don’t affect system audio
  • Works with Bluetooth remote controls
  • The volume HUD is not displayed
  • Works when the system volume is muted or is at the maximum or minimum

Used in Optika – Manual RAW Camera

Installation

CocoaPods

Add the following line to your Podfile.

pod 'VolumeButtonHandler'

Manually

Copy the VolumeButtonHandler.swift file into your project.

Usage

Press Handler

VolumeButtonHandler.shared.setPressHandler {

}

Delegate

VolumeButtonHandler.shared.delegate = self

extension ViewController: VolumeButtonHandlerDelegate {
    func volumeChanged() {

    }
}
To start/stop the handler:
VolumeButtonHandler.shared.start()
VolumeButtonHandler.shared.stop()

License

VolumeButtonHandler is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "VolumeButtonHandler",
    "version": "0.1.0",
    "summary": "A simple handler that detects the pressing of up/down buttons on iOS devices. Also works well with Bluetooth remote controls.",
    "description": "A simple handler that detects the pressing of up/down buttons on iOS devices.nFeatures:n* Volume button presses don't affect system audion* Works with Bluetooth remote controlsn* The volume HUD is not displayedn* Works when the system volume is muted or is at the maximum or minimum",
    "homepage": "https://github.com/sieroshtan/VolumeButtonHandler",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Alex Sieroshtan": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/sieroshtan/VolumeButtonHandler.git",
        "tag": "0.1.0"
    },
    "source_files": [
        "Classes",
        "VolumeButtonHandler.{swift}"
    ],
    "requires_arc": true,
    "swift_version": "4"
}

Pin It on Pinterest

Share This