UIHardware: Difference between revisions

From iPhone Development Wiki
(Created page with ''''UIHardware''' is a Class for setting and and getting some basic properties of the device. It only contains class methods. == Methods == Only methods which have been investiga…')
 
(ObjcCall supports ClassMethod=1, No need for ObjcClassCall.)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
'''UIHardware''' is a Class for setting and and getting some basic properties of the device. It only contains class methods.
'''UIHardware''' is an undocumented Class for setting and and getting some basic properties of the device. It only contains class methods.


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


{{function signature
{{function signature
Line 8: Line 8:
|firmware=2.0 —
|firmware=2.0 —
}}
}}
The method {{ObjcClassCall|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).
The method {{ObjcCall|UIHardware|ringerState|ClassMethod=1}} 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


== References ==
== References ==


{{IPFHeader|UIKit|.framework}}
{{IPFHeader|UIKit|.framework}}

Latest revision as of 20:24, 10 February 2011

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

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

References