iOS和gefencing有一些问题......
//
// ViewController.m
//
//
// Created by me on 14.05.13.
// Copyright (c) 2013 me. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()<CLLocationManagerDelegate>
{
CLLocationManager *locationManager;
CLRegion *testRegion;
}
#define METERS_PER_MILE 1609.344
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self initlocationManager];
// [self startlocationManager];
}
// init location Manager Object, set delegation, result and accurate
- (void)initlocationManager {
//create location manager object
locationManager = [[CLLocationManager alloc]init];
//this instance send its messages to our AppDelegate
[locationManager setDelegate:self]; …Run Code Online (Sandbox Code Playgroud)