iOS 11打开系统相册列表向上偏移问题
来源:互联网 发布:淘宝热卖t恤 编辑:程序博客网 时间:2024/05/16 08:11
问题如图
该问题是因为设置了
if (@available(iOS 11, *)) { UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; }
引起的。
解决方案
在弹出系统相册前加入
if (@available(iOS 11, *)) { UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAutomatic; }
UIImagePickerController *ipc = [[UIImagePickerController alloc] init]; ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; ipc.delegate = self; ipc.allowsEditing = YES; if (@available(iOS 11, *)) { UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAutomatic; } [self presentViewController:ipc animated:YES completion:nil];
在 - (void)imagePickerController:(UIImagePickerController )picker didFinishPickingMediaWithInfo:(NSDictionary
if (@available(iOS 11, *)) { UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; }
就解决了!!!
阅读全文
0 0
- iOS 11打开系统相册列表向上偏移问题
- 关于刷新列表向上偏移问题
- iOS 11 自定义UINavigationBar适配问题,导航条向上偏移20点问题
- IOS 横屏 打开相册 问题
- iOS 打开系统相册和使用相机
- iOS 打开系统相册和使用相机
- Android打开系统相册的问题
- Android打开系统相册的问题
- Android打开系统相册的问题
- iOS开发:iOS10.2手机系统打开相册遇到的各种显示英文文字的问题
- iOS解决navigationBar因为图片尺寸问题造成的会向上偏移64的问题
- iOS开发--TableView向上偏移的情况
- android drawText 显示向上偏移问题。
- iOS 打开设备相册
- IOS 打开本地相册
- iOS 打开相机、相册
- 【iOS开发】iPad横屏打开系统相册崩溃,解决方案
- iOS 11 导航栏按钮偏移问题
- ubuntu修改用户名
- thinkphp5+workerman+layim 在线客服系统
- ES官网压测工具-rally安装使用浅析
- httpclient工具类 get post(4.3.5)
- supervisor linux sdk 安装
- iOS 11打开系统相册列表向上偏移问题
- Spring-AOP
- GO语言之爱恨交织的defer
- C++内存管理_3
- React_Native 再学习1——从建立到初识导航
- centos安装mxnet
- 遗传算法之三角拟合图像
- JavaScript基础——回到顶部按钮
- B