Tag Archive for 'switch'

Ignoring ringer mute switch for audio/video playback

If you wish to let your app playback audio independently from mute switch, check the following tutorial, including sample code.
The most important part of the code:

NSError *_error = nil;
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &_error];

import AVFoundation/AVFoundation.hu and also add the framework with the same name to linking build phase.

iPhone UITableViewCell with UISwitch

Very elegant solution to place UISwitch controls on an UITableViewCell, without creating tons of XIBs in Interface Builder.
The solution can be found on Stackoverflow.com