Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rafaisen
Copy link

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.

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

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

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 {

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants