1
이것은 간단한 배터리 레벨 테스트 앱의 간단한 코드입니다.정확한 배터리 레벨을 얻는 방법은 무엇입니까?
- (void)viewDidLoad
{
[super viewDidLoad];
UIDevice *device = [UIDevice currentDevice];
device.batteryMonitoringEnabled = YES;
mLabel.text = [NSString stringWithFormat:@"%0.5f",device.batteryLevel];
}
이것은 내 응용 프로그램의 이미지입니다. 나는 왜이 수준이 다른지 모르겠다. ....? 한 99 % 수준이며, 실제로는 95 %