- Add Alert block
This commit is contained in:
1 parent
dfd5420089
commit
ab1b14b4e2
43 files changed
+1435
-353
No files matched your search
@@ -11,6 +11,7 @@
|
||||
#import "TabBarItem.h"
|
||||
#import "NSString+HexColor.h"
|
||||
#import "SharedLocationManager.h"
|
||||
#import "UIAlertView+BlockExtension.h"
|
||||
|
||||
@interface TabBarPickerSubItemsView()
|
||||
|
||||
@@ -153,11 +154,18 @@
|
||||
|
||||
- (void)openSettings
|
||||
{
|
||||
BOOL canOpenSettings = (&UIApplicationOpenSettingsURLString != NULL);
|
||||
if (canOpenSettings) {
|
||||
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
}
|
||||
UIAlertView *alert = [UIAlertView alertViewWithTitle:NSLocalizedString(@"Settings", @"") message:NSLocalizedString(@"Open Settings?", @"")];
|
||||
|
||||
[alert addButtonWithTitle:NSLocalizedString(@"OK", @"") actionBlock:^(UIAlertView *alertView, NSInteger buttonIndex) {
|
||||
BOOL canOpenSettings = (&UIApplicationOpenSettingsURLString != NULL);
|
||||
if (canOpenSettings) {
|
||||
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
}
|
||||
}];
|
||||
[alert addCancelButtonWithTitle:NSLocalizedString(@"CANCEL", @"") actionBlock:nil];
|
||||
[alert show];
|
||||
|
||||
}
|
||||
|
||||
- (void)changeSwitch:(UISwitch*)sender{
|
||||
|
||||
Reference in new issue
Block a user