SwiftUI sample to crop a image selected by PHPickerViewController
- Running the App.
- Tap 'Pick!' button on the top of screen.
- PHPickerViewController will appear in modal presentation.
- Tap to choose the image. Don't choose the first flower image on the simulator (it causes the error. a well-known issue)
- After choosing the image, the crop view will appear on the picker.
- You can drag the circles around the image to resize the crop frame.
- After resizing, tap 'Choose' button on the bottom of screen.
- Both crop view and picker will disappear and the cropped image appears in the first screen.
Environment:
- Swift version 5.7.2
- Xcode Version 14.2 (14C18)
- iOS Simulator 16.2
Sample movies: