LocateMe/AppDelegate.m
/* |
Copyright (C) 2014 Apple Inc. All Rights Reserved. |
See LICENSE.txt for this sample’s licensing information |
*/ |
#import "AppDelegate.h" |
#import <CoreLocation/CoreLocation.h> |
@implementation AppDelegate |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
{ |
if (![CLLocationManager locationServicesEnabled]) { |
// location services is disabled, alert user |
UIAlertView *servicesDisabledAlert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"DisabledTitle", @"DisabledTitle") |
message:NSLocalizedString(@"DisabledMessage", @"DisabledMessage") |
delegate:nil |
cancelButtonTitle:NSLocalizedString(@"OKButtonTitle", @"OKButtonTitle") |
otherButtonTitles:nil]; |
[servicesDisabledAlert show]; |
} |
return YES; |
} |
@end |
Copyright © 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-09-17