在我的应用程序中,我正在检查背景刷新设置是否已启用。如果没有启用,我希望该应用程序将打开设置选项,并带用户到后台刷新选项。是否有可能以编程的方式进行?
发布于 2013-11-25 07:55:50
我猜你想做这样的事?
if ([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusAvailable) {
NSLog(@"Background updates are available for the app.");
}else if([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusDenied)
{
NSLog(@"The user explicitly disabled background behavior for this app or for the whole system.");
}else if([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusRestricted)
{
NSLog(@"Background updates are unavailable and the user cannot enable them again. For example, this status can occur when parental controls are in effect for the current user.");
}https://stackoverflow.com/questions/20186923
复制相似问题