0

我们想为我们的相机应用程序播放介绍,但“想访问您的相机胶卷”通知正在扼杀我们的喧嚣。有人知道如何延迟这些吗?谢谢!

4

2 回答 2

0

使用此 NSTimer 方法来延迟方法的执行...

+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds target:(id)target selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)repeats

在您的情况下,在您的 AppDelegate.m 中放置类似的内容...

- (void)applicationDidBecomeActive:(UIApplication *)application {
     [NSTimer scheduledTimerWithTimeInterval:delayTimeInSeconds target:self selector:@selector(promptForCameraRollAccessIfNecessaryMethod) userInfo:nil repeats:NO];
}
于 2014-09-26T21:35:35.987 回答
0

我无法想象@rmaddy 的评论不是答案的场景。所以积分转到@rmaddy。以上。

只是在您的其他案例完成之前不要访问相机或请求权限。

于 2014-09-26T23:57:06.567 回答