Back/forward buttons, share button on iPad

This commit is contained in:
James Magahern
2020-07-31 14:08:10 -07:00
parent 6baf543da3
commit ad85c3dc23
6 changed files with 133 additions and 64 deletions

View File

@@ -54,10 +54,8 @@ class URLBar: UIView
textField.clearButtonMode = .whileEditing
addSubview(textField)
textField.addAction(.init(handler: { [weak self] _ in
if let self = self {
self.refreshButton.isHidden = self.textField.isFirstResponder
}
textField.addAction(.init(handler: { [textField, refreshButton] _ in
refreshButton.isHidden = textField.isFirstResponder
}), for: [ .editingDidBegin, .editingDidEnd ])
refreshButton.tintColor = .secondaryLabel