【问题标题】:IOS Can I stop the black screen effect of close detectionIOS 可以停止关闭检测的黑屏效果吗
【发布时间】:2022-06-22 11:12:15
【问题描述】:

我有一个需要距离检测的功能,但我发现了一个令人困惑的问题。每当有东西接近超过 1 秒时,它就会变黑。可以在启动距离检测的前提下停止黑屏吗

 [UIDevice currentDevice].proximityMonitoringEnabled=YES;[[NSNotificationCenter 
 defaultCenter] addObserver:self selector:@selector(proximityStateDidChange:) name:UIDeviceProximityStateDidChangeNotification object:nil];

- (void)proximityStateDidChange:(NSNotification *)note
{

if ([UIDevice currentDevice].proximityState) {
    NSLog(@"...");
    

} else {
    NSLog(@"...");
}

}

【问题讨论】:

    标签: ios objective-c


    【解决方案1】:

    通过我的广泛审查,我发现无法解决问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-28
      • 1970-01-01
      • 2023-03-12
      • 2022-01-13
      相关资源
      最近更新 更多