Let's now move to the next Location Service provided by the iOS Location Manager — Region/Boundary Monitoring. We use the
CLRegion class and its method, namely,
didEnterRegion to monitor whether the user's position falls in the boundary.
Hello Locationproject. In the
Hello_locationViewController.hfile, add the
CLRegiondefinition as follows:
Hello_LocationViewController.mfile, we create a circular boundary/region centered around San Francisco geo co-ordinates, with a radius of 1000 meters. We initialize the boundary variable as the following:
CLLocationCoordinate2D regionCords = CLLocationCoordinate2DMake (37.78 , -122.408); boundary = ...