You will notice that when you do this:
UIImagePickerController *camera = [UIImagePickerController new]; NSLog([self.camera shouldAutorotate] ? @"YES" : @"NO");
The result will be YES. I think it is set to YES by default.
You can subclass UIImagePickerController and add this method to override this method:
- (BOOL)shouldAutorotate{ return NO; }
Then, instead of using the UIImagePickerController, use the generated subclass.
UIImagePickerSubclass *camera = [UIImagePickerSubclass new];
Hope this helps :)
source share