UIEvent笔记

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

posted on 2017-01-14 08:45  花老🐯  阅读(135)  评论(0编辑  收藏  举报

导航