public class UIDevice extends NSObject
Modifier and Type | Method and Description |
---|---|
float |
batteryLevel()
Returns a number that defines the state of the battery.
|
int |
batteryState()
Returns a number that defines the state of the battery.
|
void |
beginGeneratingDeviceOrientationNotifications()
Enables the accelerometer that identifies orientation of the device.
|
static UIDevice |
currentDevice()
Returns the current device.
|
void |
endGeneratingDeviceOrientationNotifications()
Disables the accelerometer that identifies orientation of the device.
|
NSUUID |
identifierForVendor()
Returns the supplier's id of the application.
|
boolean |
isBatteryMonitoringEnabled()
Returns a Boolean that indicates whether battery monitoring is enabled.
|
boolean |
isGeneratingDeviceOrientationNotifications()
Returns a Boolean that defines whether this device generates
notifications when the orientation changes.
|
boolean |
isMultitaskingSupported()
Returns a Boolean number that defines whether the device supports
multitasking or not.
|
boolean |
isProximityMonitoringEnabled()
Returns a Boolean that defines whether the proximity monitoring is
enabled.
|
String |
localizedModel()
Returns the localized model of the device.
|
String |
model()
Returns the model of the device.
|
String |
name()
Returns the name of the device.
|
int |
orientation()
Returns the original orientation of the device.
|
boolean |
proximityState()
Returns a Boolean value that defines whether the proximity sensor is near
the user.
|
void |
setBatteryMonitoringEnabled(boolean batteryMonitoringEnabled)
Sets a Boolean value that enables or disables battery monitoring.
|
void |
setProximityMonitoringEnabled(boolean proximityMonitoringEnabled)
Sets a Boolean value that enables or disables proximity monitoring.
|
String |
systemName()
Returns the name of the system.
|
String |
systemVersion()
Returns the version of the system.
|
int |
userInterfaceIdiom()
Returns the style of interface for the current device.
|
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public static UIDevice currentDevice()
public boolean isMultitaskingSupported()
public String name()
public String systemName()
public String systemVersion()
public String model()
public String localizedModel()
public int userInterfaceIdiom()
public int orientation()
public boolean isGeneratingDeviceOrientationNotifications()
public void beginGeneratingDeviceOrientationNotifications()
public void endGeneratingDeviceOrientationNotifications()
public float batteryLevel()
public boolean isBatteryMonitoringEnabled()
public void setBatteryMonitoringEnabled(boolean batteryMonitoringEnabled)
batteryMonitoringEnabled
- A Boolean value that enables or disables
battery monitoring.public int batteryState()
public boolean isProximityMonitoringEnabled()
public void setProximityMonitoringEnabled(boolean proximityMonitoringEnabled)
proximityMonitoringEnabled
- A Boolean value that enables or
disables proximity monitoring.public boolean proximityState()
public NSUUID identifierForVendor()
Copyright © 2020. All rights reserved.