应用启动时延迟ios权限通知?

时间:2014-09-26 21:24:24

标签: ios notifications startup ios-permissions

我们想为我们的相机应用程序进行介绍,但“想要访问您的相机”通知正在杀死我们的steaze。谁知道如何推迟这些?谢谢!

2 个答案:

答案 0 :(得分: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];
}

答案 1 :(得分:0)

我无法想象@ rmaddy的评论不是答案。所以点到@rmaddy。上方。

在其他案件完成之前,请勿访问相机或申请权限。

相关问题