Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>The location manager protocol reference</strong></p> <p><a href="https://developer.apple.com/library/mac/#documentation/CoreLocation/Reference/CLLocationManagerDelegate_Protocol/CLLocationManagerDelegate/CLLocationManagerDelegate.html" rel="nofollow">https://developer.apple.com/library/mac/#documentation/CoreLocation/Reference/CLLocationManagerDelegate_Protocol/CLLocationManagerDelegate/CLLocationManagerDelegate.html</a></p> <p>1.In Appdelegate </p> <pre><code>#import &lt;CoreLocation/CoreLocation.h&gt; </code></pre> <p>In @interface file</p> <pre><code>CLLocationManager *locationManager; @property (nonatomic, retain) CLLocationManager *locationManager; </code></pre> <p>and add protocol <strong>CLLocationManagerDelegate</strong> protocol.</p> <p>2.Impliment these functions in .m.</p> <pre><code>@synthesize locationManager; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.locationManager = [[[CLLocationManager alloc] init] autorelease]; self.locationManager.delegate = self; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; self.locationManager.distanceFilter = 1.0; [self.locationManager startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region { // Show an alert or otherwise notify the user } - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region { } - (void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:(CLRegion *)region withError:(NSError *)error { } </code></pre> <p><strong>Note</strong>:If you want to debug first set current location in simulator At <strong>Debug--->Location--->Custom Location.</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload