-
Notifications
You must be signed in to change notification settings - Fork 64
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MOB-7748] iOS constraints fix for banner img view #742
[MOB-7748] iOS constraints fix for banner img view #742
Conversation
Placing a `less than equal to` constraint so that when image is not present, the nil image can provide its width for stackview beside it
Image in banner view to have constant width of 100 if its available. If not, the flexible constraint view can shrink the size of imgView making it available to stackview when image is not present
@@ -66,7 +66,7 @@ Description text</string> | |||
<rect key="frame" x="268" y="0.0" width="100" height="100"/> | |||
<constraints> | |||
<constraint firstAttribute="height" constant="100" id="8cm-im-EKi"/> | |||
<constraint firstAttribute="width" constant="100" id="bVg-Ev-iLm"/> | |||
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="100" id="bVg-Ev-iLm"/> |
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.
This is now the default behavior allowing Label and text to have more horizontal space when image is not available.
@@ -299,6 +299,9 @@ public class IterableEmbeddedView:UIView { | |||
imgView.isHidden = EMimage == nil | |||
imgView.isHidden = self.EMimage == nil | |||
imgView.image = EMimage | |||
if !imgView.isHidden { | |||
imgView.widthAnchor.constraint(equalToConstant: 100).isActive = true |
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.
This overrides the behavior by placing a constant 100 width for banner images if they are available
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.
LGTM
馃敼 Jira Ticket(s)
鉁忥笍 Description