-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dialogHeight): Adapt dialog height to images with large height #369
base: master
Are you sure you want to change the base?
Conversation
Adapt dialog height to images with a big ratio, when its height it's much bigger than the width; This corrects the problem with some iPhone devices where the height of the dialog surpasses the height of the device's screen.
Adapt dialog height to images with big ration by height; Adaptable to every iPhone with different screen sizes and ratios.
var width = bounds.size.width | ||
|
||
let imageHeight = image.size.height | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
let width = bounds.size.width | ||
let ratio = image.size.height / image.size.width | ||
var width = bounds.size.width | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
@@ -34,11 +34,28 @@ internal extension UIImageView { | |||
- returns: Height to set on the imageView | |||
*/ | |||
func pv_heightForImageView() -> CGFloat { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
Adapt dialog height to images with a big ratio, when its height it's much bigger than the width;
Adaptable to every iPhone with different screen sizes and ratios;
This corrects the problem with some iPhone devices where the height of the dialog surpasses the height of the device's screen;
Tested in every iPhone since 6s and SE 1st generation.