Hope you are asking about this.
UNUserNotificationCenter.currentNotificationCenter().getNotificationSettingsWithCompletionHandler{ (mySettings) in mySettings.alertStyle == .None }
Swift 4
UNUserNotificationCenter.current().getNotificationSettings{ (mySettings) in mySettings.alertStyle == .none }
For Objective-C
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
settings.alertStyle == UNAlertStyleNone
}]
Arun_ source
share