Beginning iOS Apps with Facebook and Twitter APIs: For iPhone, iPad, and iPod touch by Chris Dannen Christopher White

Beginning iOS Apps with Facebook and Twitter APIs: For iPhone, iPad, and iPod touch by Chris Dannen Christopher White

Author:Chris Dannen, Christopher White
Language: eng
Format: epub
Publisher: Apress®
Published: 2011-07-07T16:00:00+00:00


Using CLLocationManager

Next, we'll go over how to use CLLocationManger. First, we need to see if this feature is available. If it is, then we set the radius of the region we want to monitor; create the region to monitor with the center point, radius, and name; and finally, hand it off to CLLocationManager to monitor via its startMonitoringForRegion:desiredAccuracy: method. The desiredAccuracy value controls the size of the buffer around the edge of the region's boundary that CLLocationManager uses to determine if the device has left and reentered a region. Monitoring regions can be a really useful way to incorporate some nice features into your app, such as automatically checking in a user to certain places:

- (BOOL)registerRegion:(CLLocationCoordinate2D)center

{

// Check to see if support is available

if (![CLLocationManager regionMonitoringAvailable] ||

![CLLocationManager regionMonitoringEnabled] )

return NO;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.