UIImagePickerController iOS11调起相册 中的照片被导航栏遮挡

来源:互联网 发布:php 百度地图api demo 编辑:程序博客网 时间:2024/05/16 14:41

为了适配iOS11下来刷新下下偏移问题,全局设置了 [UIScrollView appearance] 的ContentInsetAdjustmentBehavior为UIScrollViewContentInsetAdjustmentNever导致ScrollView向上偏移了,而在iOS11以下却没问题

if (@available(iOS11.0, *)){

        [[UIScrollViewappearance] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];

    }



解决办法:将导航条的毛玻璃效果去除掉就可以了

 UIImagePickerController *pickerController = [[UIImagePickerControlleralloc] init];

    pickerController.editing = YES;

    pickerController.delegate = self;

    pickerController.allowsEditing = YES;

//    去除毛玻璃效果

    pickerController.navigationBar.translucent =NO;

    pickerController.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;

    [selfpresentViewController:pickerController animated:YEScompletion:nil];


阅读全文
0 0
原创粉丝点击