//
// ViewController.m
// UIDevice_设备
//
// Created by dc008 on 16/1/5.
// Copyright © 2016年 lin. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
UIDevice *mine = [UIDevice currentDevice];
NSLog(@"name:%@",mine.name);
NSLog(@"model:%@",mine.model);
NSLog(@"localizedModel:%@",mine.localizedModel);
NSLog(@"systemName:%@",mine.systemName);
NSLog(@"systemVersion:%@",mine.systemVersion);
mine.batteryMonitoringEnabled = YES;
NSLog(@"当前电池容量为:%f%%",mine.batteryLevel *100);
//距离传感器,靠近时屏幕黑屏
mine.proximityMonitoringEnabled = YES;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end