【问题标题】:Using shake API to detect shakes使用抖动 API 检测抖动
【发布时间】:2012-07-12 06:07:56
【问题描述】:

motionBegan:motionEnded: 等用于监控震动的事件只有在我认为有第一响应者时才能触发。好的,所以我可以像这样使视图成为第一响应者:[self.view becomeFirstResponder];。但是默认情况下视图不能是第一响应者(为什么?)所以我需要创建一个 UIView 子类并将默认的canBecomeFirstResponder 覆盖为YES。这个 UIView 子类将如何提供帮助?这一切如何运作?请帮忙。

【问题讨论】:

    标签: objective-c ios5 ios4 xcode4 motion-detection


    【解决方案1】:

    查看本指南,尤其是有关急救人员的内容: http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-01
      • 2016-04-18
      • 1970-01-01
      • 2012-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多