UIImagePickerController图片问题

土豆蒜泥 发布于 2015/07/10 10:07
阅读 93
收藏 0

设置照相机获取图片,然后后一个代码创建的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];
加载中
0
Railgun
Railgun

imageView 的 contentMode 要用 `UIViewContentModeScaleAspectFill`,按比例缩放铺满整个view

土豆蒜泥
已经做好了 感谢
返回顶部
顶部