Hi!
Klingt nach einem Bug! Bitte hängen Sie das Bild an und fügen Sie den Code ein, den Sie zur Darstellung des Ansichtscontrollers verwendet haben.
Ich habe gerade keine Zeit, das zu pflegen. Alle PRs sind willkommen. :D
func CropViewController(imagePosted: UIImage) {
let image: UIImage = imagePosted
let cropViewController = CropViewController(Bild: Bild)
cropViewController.delegate = self
cropViewController.setAspectRatioPreset(.presetSquare, animiert: true)
self.navigationController?.pushViewController(cropViewController, animiert: false)
}
Das Bild, das ich ausgewählt hatte, ist wie folgt:
Ich verwende diesen Code. Ich wollte, dass das beschnittene Bild nur quadratisch ist und es einwandfrei funktioniert.
cropVC = TOCropViewController.init(Bild: Bild)
cropVC.delegate = self
cropVC.setAspectRatioPresent(.presetSquare, animiert: true)
cropVC.aspectRatioLockEnabled = true
present(AccountSettingsVC.cropVC, animiert: true, Vervollständigung: nil
Danke Tim Oliver. Sparen Sie mir viel Entwicklungszeit.
Hilfreichster Kommentar
Ich verwende diesen Code. Ich wollte, dass das beschnittene Bild nur quadratisch ist und es einwandfrei funktioniert.
cropVC = TOCropViewController.init(Bild: Bild)
cropVC.delegate = self
cropVC.setAspectRatioPresent(.presetSquare, animiert: true)
cropVC.aspectRatioLockEnabled = true
present(AccountSettingsVC.cropVC, animiert: true, Vervollständigung: nil
Danke Tim Oliver. Sparen Sie mir viel Entwicklungszeit.