设备旋转:纵向横向

问题描述:

我正在iphone应用程序中使用滚动条显示相机视图缩放。 我想添加功能,当用户将设备从portarit旋转到风景或反之亦然时,相机视图应该相应地进行调整。设备旋转:纵向横向

我该如何解决 请帮

感谢, Aaryan

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

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