title: detect "Allow Notifications" is on/off for iOS8
body: <p>I am trying to detect the Local notification settings for the App in iOS 8</p>
  
  <p>for <code>UIUserNotificationSettings</code>, it returns me 7 as I have turned on all Badge, Sound &amp; Alert.</p>
  
  <p>In the setting, I switch off "Allow Notification" , the app still return me 7 for UIUserNotificationSettings (Badge, Sound &amp; Alert on). Is there a way to detect "Allow <code>Notification</code>" on/off? </p>
  
  <pre><code>- (void)application:(UIApplication *)application
      didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{
  
      NSLog(@"---notificationSettings.types %d" , notificationSettings.types );
      if(notificationSettings.types!=7){
          UIAlertView * alert =[[UIAlertView alloc ] initWithTitle:@"Please turn on Notification"
                                                           message:@"Go to Settings &gt; Notifications &gt; App.\n Switch on Sound, Badge &amp; Alert"
                                                          delegate:self
                                                 cancelButtonTitle:@"Ok"
                                                 otherButtonTitles: nil];
          [alert show];
      }
  }
  </code></pre>