我正在使用UIImagePicker访问我的iPhone应用程序上的相机。我希望能够为图像选择器提供两个不同的叠加层,具体取决于iPhone的方向。是否有可能做到这一点?看来,如果将以下方法放在拥有UIImagePickerController的类中,则根本不会调用它,而在上面的任何uiviewcontroller中,只有在UIImagePickerController不活动时才调用它。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
NSLog(@"shouldAutorotate called");
return YES;
}
Run Code Online (Sandbox Code Playgroud)
任何想法如何达到预期的效果?