iOS Guides | Samples

MonoTouch.UIKit.UIDevice Class

Device information, provided by the UIDevice.CurrentDevice singleton.

See Also: UIDevice

Syntax

[MonoTouch.Foundation.Register("UIDevice", true)]
public class UIDevice : NSObject

Remarks

Application developers must use the UIDevice.CurrentDevice singleton to get information on the current hardware platform.

The members of this class can be used from a background thread.

Related content

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0

The members of MonoTouch.UIKit.UIDevice are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
BatteryLevelSingle. Battery level indicator.
[read-only]
static
BatteryLevelDidChangeNotificationNSString. Notification constant for BatteryLevelDidChange
BatteryMonitoringEnabledBoolean. Controls battery monitoring. When set, you can receive battery level change events.
[read-only]
BatteryStateUIDeviceBatteryState. Current battery state if monitoring is enabled.
[read-only]
static
BatteryStateDidChangeNotificationNSString. Notification constant for BatteryStateDidChange
[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
static
CurrentDeviceUIDevice. Returns the UIDevice singleton instance.
[read-only]
GeneratesDeviceOrientationNotificationsBoolean. Determines whether device orientation notifications are posted.
[read-only]
IdentifierForVendorNSUuid. An identifier, unique to the device, based on the App Store vendor or, if not from the App Store, the bundle identifier.
[read-only]
IsMultitaskingSupportedBoolean. Determines whether this version of iOS supports multitasking.
[read-only]
LocalizedModelString. A localized string describing the current iOS device.
[read-only]
ModelString. The device model, in English.
[read-only]
NameString. The device name set by the user.
[read-only]
OrientationUIDeviceOrientation. Current device orientation.
[read-only]
static
OrientationDidChangeNotificationNSString. Notification constant for OrientationDidChange
ProximityMonitoringEnabledBoolean. Whether the proximity sensor is available and enabled.
[read-only]
ProximityStateBoolean. Determines whether the device is close to the user.
[read-only]
static
ProximityStateDidChangeNotificationNSString. Notification constant for ProximityStateDidChange
[read-only]
SystemNameString. Operating system name on the device.
[read-only]
SystemVersionString. Operating system version.
[read-only]
UniqueIdentifierString. This method is deprecated and returns an empty string. Use UIDevice.IdentifierForVendor.
[read-only]
UserInterfaceIdiomUIUserInterfaceIdiom. Which kind of device the application is running (iPhone or iPad).

Public Methods

BeginGeneratingDeviceOrientationNotifications()
Initiates posting device orientation notification events.
CheckSystemVersion(Int32, Int32) : Boolean
Whether the system version is greater than or equal to the specified major and minor values.
EndGeneratingDeviceOrientationNotifications()
Stops posting device orientation notification events.
PlayInputClick()
Plays the system "click" event in response to user taps.