Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
UIHardware - iPhone Development Wiki


From iPhone Development Wiki

UIHardware is an undocumented Class for setting and and getting some basic properties of the device. It only contains class methods.


Only methods which have been investigated are in this list. For a complete listing examine the header.

Signature +(int)ringerState;
Available in 2.0 —

The method +[UIHardware ringerState] can be used to obtain the current ringer state. It returns 1 if the ringer is on, 0 for off. Make sure you call this method from a background thread or the app might freeze (tested in SpringBoard). On the iPad the orientation-lock/mute switch is the ringer