UIPinchGestureRecognizer手势
来源:互联网 发布:av小次郎 最新域名 编辑:程序博客网 时间:2024/05/01 18:48
ViewController.h
@interface ViewController : UIViewController{
//矩阵
CGAffineTransform oldTransform;
}
@property (retain, nonatomic) IBOutlet UIImageView *mouse;
@end
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize mouse;
-(void)pinchStart:(UIPinchGestureRecognizer *)myPinch{
if((myPinch.state == UIGestureRecognizerStateBegan)||(myPinch.state == UIGestureRecognizerStateChanged)){
mouse.transform =CGAffineTransformScale(oldTransform, myPinch.scale, myPinch.scale);
}
if(myPinch.state ==UIGestureRecognizerStateEnded){
oldTransform = mouse.transform;
}
}
- (void)viewDidLoad
{
[super viewDidLoad];
UIPinchGestureRecognizer *myPinch = [[UIPinchGestureRecognizer alloc]initWithTarget:selfaction:@selector(pinchStart:)];
[mouse addGestureRecognizer:myPinch];
oldTransform = mouse.transform;
[myPinch release];
}
- UIPinchGestureRecognizer手势
- UIPinchGestureRecognizer 放大、缩小手势
- 22.手势识别之UIPinchGestureRecognizer
- 手势识别器(UIGestureRecognizer)- UIPinchGestureRecognizer(捏合)
- IOS 手势UIPinchGestureRecognizer(缩放手势) UIRotationGestureRecognizer(旋转手势)
- UIPinchGestureRecognizer
- UIPinchGestureRecognizer 例子
- iPhone/iPad高级应用与手游开发学习笔记:多点触摸与手势检测(二:UIPinchGestureRecognizer)
- iPhone/iPad高级应用与手游开发学习笔记:多点触摸与手势检测(三:UIPinchGestureRecognizer和UIRotationGestureRecognizer)
- UIPinchGestureRecognizer 的scale使用
- UIPinchGestureRecognizer 放大缩小图片问题
- UIGestureRecognizer学习之——UIPinchGestureRecognizer
- 手势
- 手势
- 手势
- 手势
- 手势
- 手势
- 输入法框架
- JFrame跳转之后,如何锁定当前页面
- 为UIImageView添加点击事件,隐藏UINavigationBar和UITabViewControllerBar
- ubuntu printer 和 加ppa或移除ppa
- 在tableview索引中显示搜索符号的方法
- UIPinchGestureRecognizer手势
- PrepareStatement 与 Statement 的区别
- 图片悬浮网页侧边栏固定不动代码
- UIControl
- MapKit学习笔记
- 启用 Tomcat 下的 HTTPS/java 证书签证
- poj2186Popular Cows
- 自动检测文本的字符集
- [Linker Error] Unable to open file 'DIALOG.RES'