Skip to content
 
 

Latest commit

 

History

8 提交

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

仓库 files navigation

JPSVolumeButtonHandler

JPSVolumeButtonHandler provides an easy block interface to hardware volume buttons on iOS devices. Perfect for camera apps! Used in JPSImagePickerController.

Features:

  • Run blocks whenever a hardware volume button is pressed
  • Volume button presses don't affect system audio
  • Hide the HUD typically displayed on volume button presses
  • Works even when the system audio level is at its maximum or minimum, even when muted

Installation

From CocoaPods

Add pod 'JPSVolumeButtonHandler' to your Podfile.

Manually

Drag the JPSVolumeButtonHandler folder into your project and link the MediaPlayer and AVFoundation frameworks to your project.

Usage

Set your blocks to be run when the volume buttons are pressed:

self.volumeButtonHandler = [JPSVolumeButtonHandler volumeButtonHandlerWithUpBlock:^{
	// Volume Up Button Pressed
} downBlock:^{
	// Volume Down Button Pressed
}];

License

This project is under the MIT license.

关于

JPSVolumeButtonHandler provides an easy block interface to hardware volume buttons on iOS devices. Perfect for camera apps!

Resources

Stars

5 stars

关注者

21 watching

复刻s

发布

贡献者

Languages