Tag: 景观肖像

如何使用UINavigationcontroller仅将一个ViewController更改为横向模式

我有两个视图控制器,我在FirstViewController中有一些video,如果我点击video,它将显示在横向模式SecondViewController,再次单击返回button后FirstViewController应该出现在Potrait模式。这里是我的代码 -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } 但它不适合我。 谢谢

被纵向/横向模式照片的UIImageOrientation困惑

我使用ios的系统相机拍摄两张照片,一张是纵向模式,另一张是横向模式,然后使用imagePicker在我的应用中挑选出来: -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{ UIImage* sourceImage = [info objectForKey:UIImagePickerControllerOriginalImage]; UIImageOrientation imageOrientation = sourceImage.imageOrientation; NSLog(@"%d",imageOrientation); } 请注意,我注销了我刚刚挑出的图像的UIImageOrientation值。 结果是肖像模式照片的值是3 (它代表UIImageOrientationRight)和风景模式照片是0 (UIImageOrientationUp)我只是不明白为什么。 谁能解释一下吗? 谢谢!