UIDevice.CurrentDevice 属性

定义

返回 UIDevice 单一实例。

public static UIKit.UIDevice CurrentDevice { [Foundation.Export("currentDevice")] get; }
member this.CurrentDevice : UIKit.UIDevice

属性值

属性

注解

开发人员通常使用如下所示的属性:

var device = UIDevice.CurrentDevice;
Console.WriteLine (device.BatteryLevel);

这可以从后台线程使用。

适用于