Skip to content

Commit

Permalink
Switched from UIAlertView to UIAlertController for iOS 9.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelomer committed Oct 11, 2020
1 parent 00678a6 commit 880a467
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
31 changes: 23 additions & 8 deletions Prefs/PXMGPRootListController.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,29 @@ - (void)setPreferenceValue:(NSNumber *)value forDangerousSlider:(PSSpecifier *)s
stringWithFormat:[specifier propertyForKey:@"warningMessage"],
recommendedMax
];
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Warning"
message:message
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil
];
[alert show];
if (@available(iOS 9.0, *)) {
UIAlertController *alert = [UIAlertController
alertControllerWithTitle:@"Warning"
message:message
preferredStyle:UIAlertControllerStyleAlert
];
[alert addAction:[UIAlertAction
actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:nil
]];
[self presentViewController:alert animated:YES completion:nil];
}
else {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Warning"
message:message
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil
];
[alert show];
}
[specifier setProperty:@YES forKey:@"__didShowWarning"];
}
}
Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: com.pixelomer.mobilegoose
Name: MobileGoose
Depends: mobilesubstrate, preferenceloader
Version: 1.3
Version: 1.3.1
Architecture: iphoneos-arm
Description: An annoying goose for your iDevice
Maintainer: PixelOmer
Expand Down

0 comments on commit 880a467

Please sign in to comment.