Skip to content

Commit fe79e26

Browse files
author
“Akshay
committed
Description reserves two lines
Image to title space optimized
1 parent 54a9c51 commit fe79e26

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

swift-sdk/Resources/IterableEmbeddedView.xib

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
<rect key="frame" x="0.0" y="0.0" width="400" height="416"/>
3535
<subviews>
3636
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="WQD-hj-6fI">
37-
<rect key="frame" x="0.0" y="0.0" width="400" height="0.0"/>
37+
<rect key="frame" x="0.0" y="0.0" width="400" height="12"/>
3838
</imageView>
3939
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="0Q3-lN-ixZ">
4040
<rect key="frame" x="16" y="16" width="368" height="333.66666666666669"/>
4141
<subviews>
42-
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="fVi-s9-EJr">
43-
<rect key="frame" x="0.0" y="0.0" width="260" height="70"/>
42+
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="-4" translatesAutoresizingMaskIntoConstraints="NO" id="fVi-s9-EJr">
43+
<rect key="frame" x="0.0" y="0.0" width="260" height="62"/>
4444
<subviews>
4545
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="750" verticalCompressionResistancePriority="1000" text="Title Text" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YhJ-Xr-beZ">
4646
<rect key="frame" x="0.0" y="0.0" width="89.666666666666671" height="25.333333333333332"/>
@@ -49,7 +49,7 @@
4949
<nil key="highlightedColor"/>
5050
</label>
5151
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalCompressionResistancePriority="1000" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jZp-8m-qQK">
52-
<rect key="frame" x="0.0" y="29.333333333333339" width="120.33333333333333" height="40.666666666666657"/>
52+
<rect key="frame" x="0.0" y="21.333333333333339" width="120.33333333333333" height="40.666666666666657"/>
5353
<string key="text">Description text
5454
Description text</string>
5555
<fontDescription key="fontDescription" type="system" pointSize="17"/>
@@ -106,7 +106,7 @@ Description text</string>
106106
<constraint firstItem="0Q3-lN-ixZ" firstAttribute="leading" secondItem="W3z-UY-cBI" secondAttribute="leading" constant="16" id="CYI-wT-5Bu"/>
107107
<constraint firstItem="0Q3-lN-ixZ" firstAttribute="top" secondItem="W3z-UY-cBI" secondAttribute="top" constant="16" id="GlZ-AF-Kcz"/>
108108
<constraint firstItem="bou-qy-tfe" firstAttribute="top" secondItem="0Q3-lN-ixZ" secondAttribute="bottom" constant="16" id="Jws-n4-1t0"/>
109-
<constraint firstItem="0Q3-lN-ixZ" firstAttribute="top" secondItem="WQD-hj-6fI" secondAttribute="bottom" constant="16" id="QPV-u9-oRb"/>
109+
<constraint firstItem="0Q3-lN-ixZ" firstAttribute="top" secondItem="WQD-hj-6fI" secondAttribute="bottom" constant="4" id="QPV-u9-oRb"/>
110110
<constraint firstItem="WQD-hj-6fI" firstAttribute="leading" secondItem="W3z-UY-cBI" secondAttribute="leading" id="SFv-hm-aAU"/>
111111
<constraint firstAttribute="trailing" secondItem="bou-qy-tfe" secondAttribute="trailing" constant="16" id="ZOK-GY-gwh"/>
112112
<constraint firstItem="bou-qy-tfe" firstAttribute="leading" secondItem="W3z-UY-cBI" secondAttribute="leading" constant="16" id="bfg-f5-ujR"/>

swift-sdk/uicomponents/IterableEmbeddedView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public class IterableEmbeddedView:UIView {
201201

202202
buttonStackView.heightAnchor.constraint(equalToConstant: primaryBtn.frame.height).isActive = true
203203
labelTitle.heightAnchor.constraint(equalToConstant: labelTitle.frame.height * 2).isActive = true
204+
labelDescription.heightAnchor.constraint(equalToConstant: labelDescription.frame.height).isActive = true
204205
}
205206

206207
func loadViewFromNib() -> UIView? {

0 commit comments

Comments
 (0)