当我们的游戏强制使用横屏之后,在调用UIImagePickerController的时候会出现闪退的情况,这只是只要在AppController.mm(相当于appdelegeta)中添加
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
return UIInterfaceOrientationMaskAll;
就可以解决了
调用完UIImagePickerController返回游戏之后,我们之前隐藏的statusBar又出现了,这时候,我们只要UIImagePickerController里面用到的UIViewController派生一个新的类,譬如:
@interface ImageViewRootController : UIViewController
{
}
@end
@implementation ImageViewRootController
- (BOOL)prefersStatusBarHidden
{
return YES;
}
@end
这样,调用完UIImagePickerController之后,就可以隐藏掉statusBar了