UIImagePickerController - crops picture to square (in portrait)

后端 未结 3 1152
被撕碎了的回忆
被撕碎了的回忆 2021-02-05 09:28

I\'m using the UIImagePickerController to take and edit a picture. it works fine in landscape, but in portrait it will crop the picture into a square (does not allow to reduce t

3条回答
  •  渐次进展
    2021-02-05 10:27

    Check out GKImagePicker library, it allows to set your custom image crop area, like this:

    self.imagePicker = [[GKImagePicker alloc] init];
    self.imagePicker.cropSize = CGSizeMake(320, 90);
    self.imagePicker.delegate = self;
    
    [self presentModalViewController:self.imagePicker.imagePickerController animated:YES];
    

提交回复
热议问题