mikaoj / SwishControl

Add sound effects to your UIControls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwishControl

CI Status Version License Platform

SwishControl is a category on UIControl for adding sound effects to UIControlEvents.

Usage

Import the SwishControl header

#import <SwishControl/SwishControl.h>

SwishControl uses AudioToolbox which supports aif, caf and wav.
This is how you add a sound effect for all UIButtons

NSString *clickPath = [[NSBundle mainBundle] pathForResource:@"click" ofType:@"aif"];
[[UIButton appearance] bs_setAudioWithPath:clickPath forEvent:UIControlEventTouchUpInside];

Of course it can be applied to a single UIControl as well, if you don't want to set a sound for all of them.

Requirements

iOS, bananas and a bunch of sound effects

Installation

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

pod "SwishControl"

Author

Joakim Gyllström

License

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

About

Add sound effects to your UIControls

License:MIT License


Languages

Language:Objective-C 60.4%Language:Shell 31.5%Language:C 4.2%Language:Ruby 4.0%