ASLocationMonitor 0.1.0

ASLocationMonitor 0.1.0

测试测试
Lang语言 Obj-CObjective C
许可证 MIT
发布上次发布2014年12月

ruddfawcett 维护。



  • Rudd Fawcett

Podfile,完整 AmbientStatus

platform :ios, '7.0'
pod "AmbientStatus", "~> 0.1.0"

Podfile,仅 ASLocationMonitor

platform :ios, '7.0'
pod "AmbientStatus/ASLocationMonitor"

用法

首先,将 <ASLocationMonitorDelegate> 添加到您想使用它的任何文件中。

在这样做后,您必须 startMonitoring 用户的交通

ASLocationMonitor *locationMonitor = [ASLocationMonitor sharedInstance]; // create new instance
locationMonitor.delegate = self; // assign the delegate to self

[locationMonitor startMonitoring]; // start monitoring the user's location

在创建了一个新的 sharedInstance 的 ASTransitMonitor 并设置了 delegate 后,您可以可选地实现以下代理,如果您需要的话

- (void)locationMonitor:(ASLocationMonitor *)locationMonitor didEnterNeighborhood:(CLLocation *)location {
    // Do something if the user entered within the neighborhood of a location
}
- (void)locationMonitor:(ASLocationMonitor *)locationMonitor didExitNeighborhood:(CLLocation *)location;
    // Do something if the user exited the neighborhood they had previously entered

要获取更多信息,请参阅 文档

致谢

Rudd Fawcett 开发。您可以在 GitHub 上找到他的所有开源项目。

有问题?

打开一个问题。我会尽量在 24 小时内回复您。

许可

AmbientStatus 和 ASLocationMonitor 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。