You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UIAlertView is deprecated in iOS 8.0.
There is still one entry in IASKAppSettingsViewController (and 1 in the demo's MainViewController).
Obviously UIAlertView should stay in to support iOS 7 and lower.
However, it would be appropriate to use UIAlertController when available (for iOS 8 and higher).
Here is my suggestion to change the ELSE condition of the MailComposer check in 'didSelectRowAtIndexPath:':
Existing code:
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:NSLocalizedString(@"Mail not configured", @"InAppSettingsKit")
message:NSLocalizedString(@"This device is not configured for sending Email. Please configure the Mail settings in the Settings app.", @"InAppSettingsKit")
delegate: nil
cancelButtonTitle:NSLocalizedString(@"OK", @"InAppSettingsKit")
otherButtonTitles:nil];
[alert show];
New code:
if ([UIAlertController class]) {
// >= iOS 8
UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Mail not configured", @"InAppSettingsKit")
message:NSLocalizedString(@"This device is not configured for sending Email. Please configure the Mail settings in the Settings app.", @"InAppSettingsKit")
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"InAppSettingsKit")
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
// Do nothing
}];
[alert addAction:cancelAction];
[self presentViewController:alert
animated:YES
completion:nil];
}
else {
// < iOS 8
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Mail not configured", @"InAppSettingsKit")
message:NSLocalizedString(@"This device is not configured for sending Email. Please configure the Mail settings in the Settings app.", @"InAppSettingsKit")
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", @"InAppSettingsKit")
otherButtonTitles:nil];
[alert show];
}
The text was updated successfully, but these errors were encountered:
UIAlertView is deprecated in iOS 8.0.
There is still one entry in IASKAppSettingsViewController (and 1 in the demo's MainViewController).
Obviously UIAlertView should stay in to support iOS 7 and lower.
However, it would be appropriate to use UIAlertController when available (for iOS 8 and higher).
Here is my suggestion to change the ELSE condition of the MailComposer check in 'didSelectRowAtIndexPath:':
Existing code:
New code:
The text was updated successfully, but these errors were encountered: