Skip to content

Commit 698d069

Browse files
committed
Update BloggingPromptsHeaderView's divider view
Applies the following changes to the divider view: - Add a name to the view - Add a height constraint using `.hairlineBorderWidth`
1 parent 2363fc1 commit 698d069

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

WordPress/Classes/ViewRelated/System/Action Sheet/BloggingPromptsHeaderView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class BloggingPromptsHeaderView: UIView, NibLoadable {
99
@IBOutlet private weak var answeredStackView: UIStackView!
1010
@IBOutlet private weak var answeredLabel: UILabel!
1111
@IBOutlet private weak var shareButton: UIButton!
12+
@IBOutlet private weak var dividerView: UIView!
1213

1314
override func awakeFromNib() {
1415
super.awakeFromNib()
@@ -34,6 +35,7 @@ private extension BloggingPromptsHeaderView {
3435
configureSpacing()
3536
configureStrings()
3637
configureStyles()
38+
configureConstraints()
3739
}
3840

3941
func configureSpacing() {
@@ -65,6 +67,12 @@ private extension BloggingPromptsHeaderView {
6567
shareButton.setTitleColor(WPStyleGuide.BloggingPrompts.buttonTitleColor, for: .normal)
6668
}
6769

70+
func configureConstraints() {
71+
NSLayoutConstraint.activate([
72+
dividerView.heightAnchor.constraint(equalToConstant: .hairlineBorderWidth),
73+
])
74+
}
75+
6876
// MARK: - Constants
6977

7078
struct Constants {

WordPress/Classes/ViewRelated/System/Action Sheet/BloggingPromptsHeaderView.xib

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<nil key="highlightedColor"/>
4949
</label>
5050
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fqk-gy-gv5">
51-
<rect key="frame" x="125" y="48" width="99" height="22.5"/>
51+
<rect key="frame" x="125" y="48" width="99" height="23.5"/>
5252
<state key="normal" title="Button"/>
5353
<buttonConfiguration key="configuration" style="plain" title="Answer Prompt">
5454
<directionalEdgeInsets key="contentInsets" top="16" leading="0.0" bottom="16" trailing="0.0"/>
@@ -58,7 +58,7 @@
5858
</connections>
5959
</button>
6060
<stackView opaque="NO" contentMode="scaleToFill" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="74j-gh-nmq">
61-
<rect key="frame" x="100.5" y="70.5" width="148" height="20.5"/>
61+
<rect key="frame" x="100.5" y="71.5" width="148" height="20.5"/>
6262
<subviews>
6363
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="✓ Answered" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ttu-81-Rjc">
6464
<rect key="frame" x="0.0" y="0.0" width="94.5" height="20.5"/>
@@ -79,11 +79,8 @@
7979
</subviews>
8080
</stackView>
8181
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9KN-UC-IRC">
82-
<rect key="frame" x="0.0" y="91" width="349" height="1"/>
82+
<rect key="frame" x="0.0" y="92" width="349" height="0.0"/>
8383
<color key="backgroundColor" systemColor="separatorColor"/>
84-
<constraints>
85-
<constraint firstAttribute="height" constant="1" id="Fe2-Kr-HkA"/>
86-
</constraints>
8784
</view>
8885
</subviews>
8986
<constraints>
@@ -107,6 +104,7 @@
107104
<outlet property="answeredLabel" destination="ttu-81-Rjc" id="qUD-tY-fry"/>
108105
<outlet property="answeredStackView" destination="74j-gh-nmq" id="mWB-ce-YU3"/>
109106
<outlet property="containerStackView" destination="HBh-15-Hby" id="ce7-Wx-TUC"/>
107+
<outlet property="dividerView" destination="9KN-UC-IRC" id="Wnd-hZ-yio"/>
110108
<outlet property="promptLabel" destination="Rye-vB-0gG" id="VoE-0W-soe"/>
111109
<outlet property="shareButton" destination="deu-kl-qJY" id="4ur-ok-U6p"/>
112110
<outlet property="titleLabel" destination="BJN-uB-YYG" id="zxX-90-kDD"/>

0 commit comments

Comments
 (0)