【发布时间】:2012-07-12 06:07:56
【问题描述】:
motionBegan: 或 motionEnded: 等用于监控震动的事件只有在我认为有第一响应者时才能触发。好的,所以我可以像这样使视图成为第一响应者:[self.view becomeFirstResponder];。但是默认情况下视图不能是第一响应者(为什么?)所以我需要创建一个 UIView 子类并将默认的canBecomeFirstResponder 覆盖为YES。这个 UIView 子类将如何提供帮助?这一切如何运作?请帮忙。
【问题讨论】:
标签: objective-c ios5 ios4 xcode4 motion-detection