【发布时间】:2009-12-29 14:23:53
【问题描述】:
我正在使用 UIImagePicker 访问我的 iPhone 应用程序上的相机。我希望能够为图像选择器提供两种不同的叠加层,具体取决于 iPhone 的方向。是否有可能做到这一点?似乎如果我将以下方法放在拥有 UIImagePickerController 的类中,它根本不会被调用,并且在上面的任何 uiviewcontroller 中,它只会在 UIImagePickerController 不活动时被调用。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
NSLog(@"shouldAutorotate called");
return YES;
}
知道如何达到预期的效果吗?
【问题讨论】:
标签: objective-c iphone cocoa-touch camera