小编WLy*_*e86的帖子

捏手势识别器

合适的人,我刚刚开始进入Xcode 4,打算开始制作iPhone应用程序.没什么太重要的,不是游戏等...但是我正在努力应对这种捏合的姿态....

出于某种原因,当我使用iphone 5.0模拟器时它一切正常......但是当我在iphone 3G上导出和尝试它时,我在使用夹点设备加载屏幕时出错.

我正在使用此代码进行捏合手势:

在.h文件中:

-(IBAction)Zoom:(UIPinchGestureRecognizer *)recognizer;
Run Code Online (Sandbox Code Playgroud)

在.m文件中:

-(IBAction)Zoom:(UIPinchGestureRecognizer *)recognizer{
    recognizer.view.transform = CGAffineTransformScale(recognizer.view.transform, recognizer.scale,recognizer.scale); recognizer.scale = 1; 
}
Run Code Online (Sandbox Code Playgroud)

但当我点击我的按钮使用此代码加载带有手势工具(OurWorkSubOne)的屏幕时:

-(IBAction)switchViewSeven:(id)sender {
    OurWorkSubOne *second = [[OurWorkSubOne alloc] initWithNibName:nil bundle:nil];
   [self presentModalViewController:second animated:YES];
}
Run Code Online (Sandbox Code Playgroud)

我得到这个输出:

GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Fri Sep 16 06:56:50 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c xcode4

2
推荐指数
1
解决办法
8366
查看次数

标签 统计

iphone ×1

objective-c ×1

xcode4 ×1