【发布时间】:2013-10-11 13:32:13
【问题描述】:
我在 iOS 7 中遇到状态栏问题。
下面是展示这个图像选择器的代码
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
picker.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;
if ([self respondsToSelector:@selector(presentViewController:animated:completion:)]){
[self presentViewController:picker animated:YES completion:^{
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
[[UIApplication sharedApplication] setStatusBarHidden:YES
withAnimation:UIStatusBarAnimationNone];
}];
}
else {
[self presentModalViewController:picker animated:YES];
}
}
当我尝试选择图像时,屏幕如下所示
谁能帮我解决这个问题?
【问题讨论】:
-
你在用assetlibrary吗?
-
不,我没用那个
-
@Dev,刚刚为您添加了完整的解决方案。请检查我的答案的编辑部分。
标签: iphone ios7 uiimagepickercontroller statusbar