Skip to content

Commit efb25b1

Browse files
authored
Merge pull request #3 from tesddev/feature_show_or_hide_linkTextfield
Feature show or hide link textfield
2 parents 4ba09c7 + 6b9ab71 commit efb25b1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/WebViewLibrary/WebViewLibrary.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ public class WebViewLibrary: UIViewController, UIWebViewDelegate {
108108
linkTextField.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.9),
109109
linkTextField.heightAnchor.constraint(equalToConstant: 40),
110110

111-
webView.topAnchor.constraint(equalTo: linkTextField.bottomAnchor, constant: 28),
112111
webView.centerXAnchor.constraint(equalTo: bigView.centerXAnchor),
113112
webView.bottomAnchor.constraint(equalTo: closeButton.topAnchor, constant: -20),
114113
webView.widthAnchor.constraint(equalTo: bigView.widthAnchor, multiplier: 0.9),
@@ -118,6 +117,12 @@ public class WebViewLibrary: UIViewController, UIWebViewDelegate {
118117
closeButton.heightAnchor.constraint(equalToConstant: 40),
119118
closeButton.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -20),
120119
])
120+
121+
if isLinkTextfieldHidden {
122+
webView.topAnchor.constraint(equalTo: grabberView.bottomAnchor, constant: 30).isActive = true
123+
} else {
124+
webView.topAnchor.constraint(equalTo: linkTextField.bottomAnchor, constant: 28).isActive = true
125+
}
121126
}
122127

123128
@objc func didTapSavedOptionButton() {

0 commit comments

Comments
 (0)