iphone ios 横屏,旋转 无响应

以下大家友情支持一下:

做了一个产品,需要人气支持一下,android和iphone上91市场搜索#super junior粉丝团#,或者直接到页面下载http://m.ixingji.com/m.html?p=X16,大家帮忙捧捧场


旋转的办法:

iphone横竖屏转换

http://fei263.blog.163.com/blog/static/9279372420101111043247/


还有一个方法:

1。在xib设置为横屏模式

2。继承实现

shouldAutorotateToInterfaceOrientation



我的代码按照这种方法,始终没有旋转图像。

shouldAutorotateToInterfaceOrientation只是被调用了一次。

后来看http://developer.apple.com/library/ios/#qa/qa1688/_index.html文档明白,在 window中只能添加一次 UIviewcontroller ,否则接受不到旋转信息。因此只调用一次shouldAutorotateToInterfaceOrientation


其中涉及到仿摄变换

1。http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Layers.html

2。http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CGAffineTransform/Reference/reference.html


用CGRectMake重新设置坐标,就ok

你可能感兴趣的:(iphone ios 横屏,旋转 无响应)