Back/forward buttons, share button on iPad
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user