您的位置:首页 > 移动开发 > IOS开发

ios下打开相机遇到的闪退问题 (Snapshotting a view that has not been rendered results in an empty snapshot.)

2013-12-30 16:15 656 查看
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen
updates.


开始以为是这句话 所以一直找关于这句话的 结果找了2个小时 终于知道了ios7的UIImagePickerController是竖屏的 结果游戏是横屏所以一打开就闪退了

[b]解决方案:[/b]


ios文件夹下得AppController

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{

return UIInterfaceOrientationMaskAll;

}

然后在使用UIImagePickerController的viewController

- (NSUInteger)supportedInterfaceOrientations{

return UIInterfaceOrientationMaskLandscape;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐