Skip to content

SwiftUI sample to crop a image selected by PHPickerViewController

Notifications You must be signed in to change notification settings

takenori-kabeya/SwiftUIImageCropPicker

Repository files navigation

SwiftUIImageCropPicker

SwiftUI sample to crop a image selected by PHPickerViewController

  1. Running the App.
  2. Tap 'Pick!' button on the top of screen.
  3. PHPickerViewController will appear in modal presentation.
  4. Tap to choose the image. Don't choose the first flower image on the simulator (it causes the error. a well-known issue)
  5. After choosing the image, the crop view will appear on the picker.
  6. You can drag the circles around the image to resize the crop frame.
  7. After resizing, tap 'Choose' button on the bottom of screen.
  8. 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:

https://youtube.com/shorts/J3lHTRRpFB4

https://youtube.com/shorts/jE_IZvi-HDU

About

SwiftUI sample to crop a image selected by PHPickerViewController

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages