Skip to content

mikaoj/SwishControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published