iphone - "Our Choice"应用程序如何缩放以查看内容部分?

标签 iphone objective-c cocoa-touch ipad pinch

可以在这里看到上述应用程序:http://pushpoppress.com/ourchoice/ .我感兴趣的是他们可以在底部自由捏缩略图以放大到全 View 的部分。复制这种效果会很有趣。

有什么想法吗?

最佳答案

旋转图片:

导入数学.h

在touchesbegan中:找到firsttouch、secondtouch等

然后: float startdirection = tanh((firsttouch.y-secondtouch.y)/(firsttouch.x-secondtouch.x));

在touchesmoved中: 再次找到 firsttouch、secondtouch,然后:

float newdirection = tanh((firsttouch.y-secondtouch.y)/(firsttouch.x-secondtouch.x));

image.transform = CGAffineTransformMakeRotation(newdirection-startdirection);

关于iphone - "Our Choice"应用程序如何缩放以查看内容部分?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6566626/

相关文章:

objective-c - 在 iOS 中使用单独的 View Controller 支持两个方向

iPhone 应用程序 : How to implement horizontal knob as shown in image

ios - 从我的应用程序向 iOS 语音控制引擎注册新的语音命令

ios - 在 FBSDKApplicationDelegate 类中获取错误

objective-c - Apple CameraUI 代码的内存泄漏

objective-c - NSFileManager 在 cocoa 中创建类似 .app 的文件/文件夹

ios - 从 plist 中获取和比较 CFBundleVersion

iphone - 如果 "word"文本会显示 "wrong"(iPhone SDK)

iphone - 从 AVCaptureAudioDataOutputSampleBufferDelegate 播放音频

iphone - 保留随机 View 之间的 UILabel 值