Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implementation of #112 (support contentMode .scaleAspectFit) #113

Conversation

jangelsb
Copy link
Contributor

@jangelsb jangelsb commented Dec 24, 2020

Fixes #112

First two commits were me getting the code to compile locally on an M1 MacBookPro

  • Remove RightNavItemDelegate
  • Add file ImageViewerTransitionPresentationManager
  • Update to use new Carthage xcframeworks for SDWebImage
  • Remove copy frameworks build phase
  • Update iOS SDK target to iOS 12 (wasn't set before as was defaulting to iOS 13.6??)

Add the ability to pass in a contentMode in the ImageViewerOptions

  • Add the ability to pass in contentMode (for the imageView and the animations)
  • Explicitly set imageContentMode in the init
  • Close button to do a normal dismiss which does the transition animation
  • Minor clean up

Demo of customizing the contentMode to .scaleAspectFit and new close animation:
https://user-images.githubusercontent.com/11953370/103055533-583c1e80-454f-11eb-93fb-cebc596ec022.mp4

* Add file ImageViewerTransitionPresentationManager
* Update to use new Carthage xcframeworks for SDWebImage
* Remove copy frameworks build phase
…nimations)

* Explicitly set imageContentMode in the init
* Close button to do a normal dismiss which does the transition animation
* Minor clean up
}) { _ in
self.dismiss(animated: false, completion: completion)
}
self.dismiss(animated: true, completion: nil)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually allows for the animation transition to run and it looks really nice!

@github-actions
Copy link

Stale pull request message

@thomasdelgado
Copy link
Contributor

It's a bummer that such valuable change was closed and not even responded 2 years later.

@filipealva filipealva mentioned this pull request Mar 18, 2022
@michaelhenry michaelhenry reopened this Mar 18, 2022
@michaelhenry
Copy link
Owner

michaelhenry commented Mar 18, 2022

@thomasdelgado @jangelsb i’m sorry if i missed this pr. I’m reopening this. Thank you

@michaelhenry
Copy link
Owner

this pr is looking good, created #125 this pr instead for resolving some git conflicts and some minor modifications. thank you so much.

@jangelsb
Copy link
Contributor Author

Sweet! I am glad it got merged in and is hopefully helpful for others 😊

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a way to support contentMode = .scaleAspectFit
3 participants