Tabs implementation

Favicons and stuff too
This commit is contained in:
James Magahern
2020-07-30 23:54:20 -07:00
parent bba9efbbb6
commit 6baf543da3
14 changed files with 487 additions and 105 deletions

View File

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