1
回答
UIImagePickerController图片问题
华为云实践训练营,热门技术免费实践!>>>   

设置照相机获取图片,然后后一个代码创建的ImagView显示,但是图片被拉伸、模糊,设置了imageViw.contentMode= UIViewContentModeScaleAspectFit;之后,原来满屏的图片,现在抵不满屏幕,各位大神帮忙看看

UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera;

    if (![UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {
        sourceType = UIImagePickerControllerSourceTypeCamera;
    }
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];//初始化
    picker.delegate = self;
    picker.allowsEditing = YES;//设置可编辑
    picker.sourceType = sourceType;
    [self presentViewController:picker animated:YES completion:^{
    }];//进入照相界面
    [picker release];
<无标签>
举报
土豆蒜泥
发帖于2年前 1回/85阅
顶部