How to control UIswtch of on and off sound
Playing sound for click sound when date is selected in the date picker. Now i need to set my setting module for control ON and OFF using UISWitch.
How to set my control of sound to uiswitch .
-(void) playback
{
NSString *path = [[NSBundle mainBundle] pathForResource:@"click" ofType:@"caf"];
if (path)
{
NSURL *url = [NSURL fileURLWithPath: path];
SystemSoundID soundID;
AudioServicesCreateSystemSoundID ((CFURLRef)url, &soundID);
AudioServicesPlaySystemSound(soundID);
}
}
|