博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Gestures and Touches(Chapter 8 of The iPhone™ Developer’s Cookbook)
阅读量:5261 次
发布时间:2019-06-14

本文共 1565 字,大约阅读时间需要 5 分钟。

  Touches have life cycles. Each touch can pass through any of five phases that represent the progress of the touch within an interface. These phases are as follows:
  
UITouchPhaseBegan—Starts when users touch the screen.
  
UITouchPhaseMoved—Means a touch has moved on the screen.
  
UITouchPhaseStationary—Indicates that a touch remains on the screen surface but that there has not been any movement since the previous event.
  
UITouchPhaseEnded—Gets triggered when the touch is pulled away from the screen.
  
UITouchPhaseCancelled—Occurs when the iPhone OS system stops tracking a particular touch.This usually occurs due to a system interruption, such as when the application is no longer active or the view is removed from the window.
  Predefined callback methods handle the start, movement, and release of touches from the screen. Corresponding to the phases you’ve already seen, the methods involved are as follows. Notice that UITouchPhaseStationary does not generate a callback. 
  touchesBegan:withEvent:—Gets called at the starting phase of the event, as the user starts touching the screen.
  
touchesMoved:withEvent:—Handles the movement of the fingers over time.
  
touchesEnded:withEvent:—Concludes the touch process, where the finger or fingers are released. It provides an opportune time to clean up any work that was handled during the movement sequence.
  
touchesCancelled:WithEvent:—Called when Cocoa Touch must respond to a system interruption of the ongoing touch event.

 

转载于:https://www.cnblogs.com/zhtf2014/archive/2010/12/31/1923089.html

你可能感兴趣的文章
CF1215E Marbles
查看>>
手把手教你写一个windows服务 【基于.net】 附实用小工具{注册服务/开启服务/停止服务/删除服务}...
查看>>
.net Core 图片验证码 基于SkiaSharp实现
查看>>
fish redux 个人理解
查看>>
java 笔记一些
查看>>
夜晚的岳麓山
查看>>
Struts2工作原理及流程
查看>>
Chrome(谷歌浏览器)不识别document.documentElement.scrollTop
查看>>
/Home/Tpl/Equipment/rangeIndex.html 里调用魔板
查看>>
创建本地索引和全局索引
查看>>
Oracle导出存储过程
查看>>
创建LIST分区
查看>>
一些规范(自用)
查看>>
记录SSD中的一些东西
查看>>
第二十一章 Django的分页与cookie
查看>>
表示一个文件的 File 类型
查看>>
ORA-01403:no data found 解决办法
查看>>
当 智能箭头 碰到 方向箭头 。。。。。。。
查看>>
巧妙运用ViewStub写出类似Tab选项卡(想怎么写tab就怎么写,横着写竖着写随你)(转)...
查看>>
WPF的2D图形化实现--WPF 集装箱堆场图形化实现实例
查看>>