/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// 近接センサーを使用ã™ã‚‹ [UIDevice currentDevice].proximityMonitoringEnabled = YES; // 変更ã®é€šçŸ¥ã‚’å—ã‘å–るメソッドã®ç™»éŒ² addObserver: self selector:@selector(proximityStateDidChange: ) name:UIDeviceProximityStateDidChangeNotification object:nil]; // 近接センサーã®çŠ¶æ…‹å¤‰æ›´æ™‚ã«å‘¼ã²ã‚™å‡ºã•ã‚Œã‚‹ãƒ¡ã‚½ãƒƒãƒˆã‚™ NSLog(@"%s",__PRETTY_FUNCTION__); NSLog(@"state = %@", [UIDevice currentDevice].proximityState ? @"YES":@"NO"); }
Comments
