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

@@ -30,16 +30,16 @@ class ScriptPolicyControl: UIControl
convenience init() {
self.init(frame: .zero)
allowButton.addAction(UIAction(handler: { [weak self] _ in
self?.policyStatus = .allowed
self?.sendActions(for: .valueChanged)
allowButton.addAction(UIAction(handler: { [unowned self] _ in
self.policyStatus = .allowed
self.sendActions(for: .valueChanged)
}), for: .touchUpInside)
allowButton.imageView?.contentMode = .scaleAspectFit
addSubview(allowButton)
denyButton.addAction(UIAction(handler: { [weak self] _ in
self?.policyStatus = .blocked
self?.sendActions(for: .valueChanged)
denyButton.addAction(UIAction(handler: { [unowned self] _ in
self.policyStatus = .blocked
self.sendActions(for: .valueChanged)
}), for: .touchUpInside)
denyButton.imageView?.contentMode = .scaleAspectFit
addSubview(denyButton)