UIImagePickerController相机拍照添加定位图片

// 拍照区域下移
        CGSize screenBounds = [UIScreen mainScreen].bounds.size;
        CGFloat topHeight = 44.0; // 顶部闪光灯高度  iPhone X 再 + 状态栏高度44.0
        CGFloat bottomHeight = 123.0; // 底部按钮区域高度  iPhone X 再 + 底部功能条高度34.0
        CGFloat camHeight = screenBounds.height - topHeight - bottomHeight;
        _imagePickerVc.cameraViewTransform = CGAffineTransformMakeTranslation(0, (screenBounds.height - camHeight) / 2.0 - topHeight);
        
        // 添加头像框
        UIView *tempView = [[UIView alloc] initWithFrame:CGRectMake((screenBounds.width - 130.0)/2.0, (screenBounds.height - 130.0)/2.0, 130.0, 130.0)];
        UIImageView *layView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 130.0, 130.0)];
        layView.image = [UIImage imageNamed:@"AlbumAddBtn"];
        [tempView addSubview:layView];
        [_imagePickerVc.view addSubview:tempView];
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容