如何在我的应用程序中实现圆形ImagePicker?
这是一个使这成为可能的库,但我不知道Objective-C: https://github.com/ruslanskorb/RSKImageCropper
我当前的代码:
var selectedImage:UIImage?
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
if let editImage = info["UIImagePickerControllerEditedImage"] as? UIImage {
profilImageView.image = editImage
selectedImage = editImage
} else if let originalImage = info["UIImagePickerControllerOriginalImage"] as? UIImage {
profilImageView.image = originalImage
selectedImage = originalImage
}
dismiss(animated: true, completion: nil)
}