Latest 0.1.1
Homepage https://github.com/BellAppLab/Volumer
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, MediaPlayer
Authors

[![CI Status](http://img.shields.io/travis/Bell App Lab/Volumer.svg?style=flat)](https://travis-ci.org/Bell App Lab/Volumer)
Version
License
Platform

Usage

import UIKit
import Volumer

class ViewController: UIViewController {

    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)

        //Use this if you want the volume buttons to still affect the device's playback volume
        //The default is `true`
        Volume.keepIntact = false

        //Use your own MPVolumeView if you want
        //Obs. This method needs to be executed if you have called `Volume.reset()`
        Volume.use(self.volumeView)

        //Register a volume up block
        Volume.when(.Up) {
            print("UP!")
        }

        //Register a volume down block
        Volume.Down.when {
            print("Down")
        }
    }

    override func viewDidDisappear(animated: Bool) {

        //Be sure to call this when you're done
        Volume.reset()

        super.viewDidDisappear(animated)
    }

}

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 8+

MediaPlayer

NO AVFoundation o/

Installation

Volumer is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "Volumer"

Author

Bell App Lab, [email protected]

License

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

Latest podspec

{
    "name": "Volumer",
    "version": "0.1.1",
    "summary": "A Swifty way to take control over the volume buttons on iOS.",
    "description": "A Swifty way to take control over the volume buttons on iOS. Inspired by: https://github.com/jpsim/JPSVolumeButtonHandler",
    "homepage": "https://github.com/BellAppLab/Volumer",
    "license": "MIT",
    "authors": {
        "Bell App Lab": "[email protected]"
    },
    "source": {
        "git": "https://github.com/BellAppLab/Volumer.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "frameworks": [
        "UIKit",
        "MediaPlayer"
    ]
}

Pin It on Pinterest

Share This