ios 设备应用。UIDevice

 var device:UIDeviceUIDevice.currentDevice()

        

         println("device.name:\(device.name)");

         println("device.systemName:\(device.systemName)");

         println("device.systemVersion:\(device.systemVersion)");

         println("orientation.isLandscape:\(device.orientation.isLandscape)");

         println("localizedModel:\(device.localizedModel)");

        println("identifierForVendor:\(device.identifierForVendor)")

        device.batteryMonitoringEnabled = true;

        println("batteryState:\(device.batteryState)")

          println("batteryLevel:\(device.batteryLevel)")


你可能感兴趣的:(ios,swift,uidevice)