ASTransitMonitor 0.1.0

ASTransitMonitor 0.1.0

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

ruddfawcett 维护。



  • 作者
  • Rudd Fawcett

Podfile, 完整的环境状态

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

Podfile,仅 ASTransitMonitor

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

用法

首先,将 <ASTransitMonitorDelegate> 添加到您希望使用的任何文件中。

完成之后,您需要 startMonitoring 用户的旅行

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

[transitMonitor startMonitoring]; // start monitoring the user's transit

在创建新的 sharedInstance 的 ASTRansitMonitor 并设置 delegate 之后,您可以按需实现以下可选委托

- (void)transitMonitor:(ASTransitMonitor *)transitMonitor didChangeTransitState:(ASTransitState)transitState {
    // Do something if the user starts driving here (or has changed transit)
}
- (void)transitMonitor:(ASTransitMonitor *)transitMonitor didChangeSpeed:(CGFloat)newSpeed oldSpeed:(CGFloat)oldSpeed{
    // Do something if the user has sped up here
}
- (void)transitMonitor:(ASTransitMonitor *)transitMonitor didAccelerationChange:(CMAcceleration)acceleration{
    // Do something if the user started shaking the device here
}

更多帮助,请参阅 文档

鸣谢

ASTransitMonitorSOMotionDetector(尽管非逐字)中吸取了大量的代码,获得了 许可,该软件由 Artur Mkrtchyan (arturdev)SocialObjects Software 开发。

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

有什么问题吗?

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

许可证

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