2011-12-23 61 views

回答

4

簡單的答案是肯定的:只有圓形區域( 「柵欄」),目前支持

CLRegion *region = your geofence; 
CLLocationCoordinate2D myLocation = CLLocationCoordinate2DMake(38.9, -77.04); 
if ([region containsCoordinate:myLocation]) { 
    NSLog(@"You're soaking in it."); 
} 

注意。請參閱Location Awareness Programming GuideCLRegion Class Reference

+0

我想containsCoordinate已被棄用,大部分語法已被更改。 – 2015-09-25 14:59:12

相關問題