我可以以编程方式翻转整个显示对象,使其颠倒

时间:2012-05-09 05:19:18

标签: ios

我在iPad上有一个教学应用程序,iPad固定在桌面上。 一边是老师,另一边是学生。我想老师来 进行设置操作,他/她可以正常阅读,然后拥有整个 显示翻转,以便学生可以正常阅读。

2 个答案:

答案 0 :(得分:1)

是的,这可以获得那种类型的翻转,因为你必须使用UIGestureRecognizer交换视图可以颠倒翻转,反之亦然更多信息阅读本文 http://www.techotopia.com/index.php/Identifying_iPhone_Gestures_using_iOS_4_Gesture_Recognizers_(Xcode_4)

http://mobiledevelopertips.com/event-handling/gestures-recognizers-tap-pinchzoom-rotate-swipe-pan-long-press.html

http://www.icodeblog.com/2010/10/14/working-with-uigesturerecognizers/

享受这可能会帮助你分配 快乐的编码 :)

修改 您可以参考我的问题,这个问题的答案可以帮助您分配,看看已接受的答案问题是how to display imageview tilted?

答案 1 :(得分:0)

是的,这是可能的。 你可以使用CABasicAnimation -

CABasicAnimation* rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = // To extent that you want.

还有其他几种方法可以实现这一目标。