URLBar shouldn't show cancel button on iPad, visual tweaks

This commit is contained in:
James Magahern
2020-07-31 14:23:00 -07:00
parent ad85c3dc23
commit 2eec003a84
4 changed files with 18 additions and 10 deletions

View File

@@ -52,6 +52,10 @@ class URLBar: UIView
textField.font = .systemFont(ofSize: 14.0)
textField.clearingBehavior = .clearOnInsertionAndShowSelectionTint
textField.clearButtonMode = .whileEditing
textField.addAction(UIAction(handler: { [unowned self] _ in
// Mask view visibility is affected by editing state.
self.layoutSubviews()
}), for: [ .editingDidBegin, .editingDidEnd ])
addSubview(textField)
textField.addAction(.init(handler: { [textField, refreshButton] _ in