Revision: 41745
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 23, 2011 02:33 by takezou621
Initial Code
// 近接センサーを使用ã™ã‚‹ [UIDevice currentDevice].proximityMonitoringEnabled = YES; // 変更ã®é€šçŸ¥ã‚’å—ã‘å–るメソッドã®ç™»éŒ² [[NSNotificationCenter defaultCenter] addObserver: self selector:@selector(proximityStateDidChange: ) name:UIDeviceProximityStateDidChangeNotification object:nil]; // 近接センサーã®çŠ¶æ…‹å¤‰æ›´æ™‚ã«å‘¼ã²ã‚™å‡ºã•ã‚Œã‚‹ãƒ¡ã‚½ãƒƒãƒˆã‚™ - (void) proximityStateDidChange:(NSNotification *)notification{ NSLog(@"%s",__PRETTY_FUNCTION__); NSLog(@"state = %@", [UIDevice currentDevice].proximityState ? @"YES":@"NO"); }
Initial URL
Initial Description
Initial Title
近接センサー
Initial Tags
Initial Language
Objective C