繁体   English   中英

设备旋转:纵向-横向

[英]device rotation: portrait- landscape

我正在使用iPhone应用程序,其中正在显示相机视图以使用滚动条放大缩小。 我想添加功能,当用户将设备从纵向移动到横向或从横向旋转时,相机视图应相应调整。

我该如何解决,请帮忙

谢谢,Aaryan

您的UIViewController需要实现以下方法:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM