액세스 할 수있는 유일한 설정은 앱 또는 설정 앱에있을 수있는 앱 설정입니다. 앱의 설정은 [NSUserDefaults standardUserDefaults]를 사용하여 설정하거나 가져 오는 설정입니다. 그러나 귀하의 경우에는 1 초 후에 발생하는 통지를 예약하고, 귀하가 전화를 받았는지 확인하십시오 - (void) application : (UIApplication *) application didReceiveLocalNotification : (UILocalNotification *) notification. 다음은 예제 코드입니다.
-(void) createLocalNofication{
UILocalNotification *local = [[UILocalNotification alloc] init];
local.fireDate = [NSDate dateWithTimeIntervalSinceNow:1.0f];
local.alertBody = @"Some Alert Body";
local.timeZone = [NSTimeZone defaultTimeZone];
[[UIApplication sharedApplication] scheduleLocalNotification:local];
}
- (void)application:(UIApplication *)application didReceiveLocalNotification: (UILocalNotification *)notification {
//Here you can set some flag
}
주제에 대한 더 많은 통찰력을 얻으려면 apple documentation link을 확인하십시오.
더 참고로
UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
if (!(types & UIRemoteNotificationTypeAlert)) {
UIAlertView *al = [[UIAlertView alloc] initWithTitle:@"TITLE" message:@"YOUR MESSAGE" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:@"Settings",nil];
[al show];
[al release];
}
아래와 같이 비활성화 될 때 앱의 알림 설정을 알 수 및 경고를 표시 할 수 있습니다
확인 할 수있다 프레임 워크는 오지 않습니다. 원한다면 – codercat
@iDev를 사용자 정의 할 수 있습니다. 감사하지만 내가 ref 만 언급했습니다. 사용자가 내 앱의 설정 -> 알림 센터를 사용 중지 한 경우 해당 유형의 알림을 표시하려고합니다. – Zubair