捏拢Demo: SimpleGestures-iPad

捏拢Demo: SimpleGestures-iPad

<Wrox.Professional.iPhone.and.iPad.Application.Development.Nov.2010> ch05
SimpleGestures-iPad
功能: 捏拢➤图片缩小

教程SimpleGestures-iPad的细节

不是太重要.

本App,图片位于中央.

例子手势:
➤➤ 单击
➤➤ 双击
➤➤ 捏拢(pinch)
➤➤ 旋转
➤➤ 扫
➤➤ 摇(Pan)和拖

mp3->caf 终端:  /usr/bin/afconvert -f caff -d LEI16 Boing.mp3 Boing.caf

声音框架:  AudioToolbox.framework

程序加载4件事

➤➤ 默认图片和声音
➤➤ 创建手势识别器
➤➤ 初始化显示值
➤➤ 类加上通知中心

输出(outlet):
➤➤ imageView UIImageView
➤➤ pinchRotateSegmentedControl  UISegmentedControl
➤➤ swipePanSegmentedControl UISegmentedControl
➤➤ tapCountLabel UILabel
➤➤ touchCountLabel UILabel
➤➤ touchPhaseLabel UILabel

事件(Action):
➤➤ choosePinchOrRotate
➤➤ chooseSwipeOrDrag

成为第一个响应: tf.becomeFirstResponder
Phase 状态
AudioServicesCreateSystemSoundID 斯坦福有
13 Nov 09  iPhoneGeek 爱疯极客: iPhone游戏编程教程之四-游戏简单音频

手势事件
➤➤ UITapGestureRecognizer
➤➤ UIPinchGestureRecognizer
➤➤ UISwipeGestureRecognizer
➤➤ UIRotationGestureRecognizer
➤➤ UIPanGestureRecognizer

回调函数与其对应事件
➤➤ handleTapEvent for UITapGestureRecognizer
➤➤ handleDoubleTapEvent for UITapGestureRecognizer
➤➤ handlePinchEvent for UIPinchGestureRecognizer
➤➤ handleSwipeEvent for UISwipeGestureRecognizer
➤➤ handleRotateEvent for UIRotationGestureRecognizer
➤➤ handlePanEvent for UIPanGestureRecognizer

摇动事件
➤➤ motionBegan:withEvent
➤➤ motionEnded:withEvent
➤➤ motionCancelled:withEvent

2种类型的事件
➤➤ touchesBegan, touchesMoved, touchesEnded and touchesCancelled
➤➤ developer-defined with use of the UIGestureRecognizer class

附录

Multitouch Events

Marshal's Blog: 编写简单的手势示例:Tap
Android手势识别ViewFlipper触摸动画
微软: win7 多点触摸之手势 - 本机(动手实验)
adobe: Gesture 事件处理

关键字: UIPinchGestureRecognizer scale

How can I use pinch zoom(UIPinchGestureRecognizer) to change width of a UITextView?

Working with UIGestureRecognizers
UIPinchGestureRecognizer position the pinched view between the two fingers
Drag and drop in 3 lines

kvc (中)
iBook 功能 - 放大縮小 (中)

ios 根据手势放大或缩小图片
iphone下scrollview图片浏览器小记 (中)

关键字2: UIPinchGestureRecognizer scale UIScrollView
Hal Mueller’s Blog : A very simple UIScrollView demo

iPhone by Radix : Zoom in and Zoom out an Image
iPadのあのTVCMを再現したアプリがついに登場…かと思いきやリジェクトされたんでソースうp (源代码)


UIScrollView 动态创建

UIScrollView program dynamical

关键词:

scrollViewDidZoom:(UIScrollView *)scrollView


好站

第三极

IOS常用代码备份[置顶]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值