- UIEvent是什么
代表iOS系统中的一个事件。
UIEvent分为三类,touch events, motion events, and remote-control events - touch events
每一个event包含多个UITouch对象。
每一个event有时间戳(timestamp),可以依靠它来区分不同的event。
在event的多个阶段,系统保证event是相同的。用户不应该retain系统的event或event中的touch。
如果需要保存不用阶段event的信息,应该从event中copy出信息,而不是retain这个event。 - motion events
UIEventTypeMotion
. 和设备的运动有关,比如摇晃手机。 - remote-control events
从headset或外部辅助设备(耳机等)返回的时间。
对于这类事件,定义了许多subtype
- UIEventSubtypeRemoteControlPlay
- UIEventSubtypeRemoteControlPause
- UIEventSubtypeRemoteControlStop
- UIEventSubtypeRemoteControlTogglePlayPause
。。。。
- 资料