Various fixes

This commit is contained in:
Ilya Laktyushin
2023-11-29 16:13:57 +04:00
parent 60b6d45be5
commit 97e3a66cfb
7 changed files with 37 additions and 8 deletions

View File

@@ -4,16 +4,29 @@ import Display
import ComponentFlow
final class FlipButtonContentComponent: Component {
init() {
let tag: AnyObject?
init(
tag: AnyObject?
) {
self.tag = tag
}
static func ==(lhs: FlipButtonContentComponent, rhs: FlipButtonContentComponent) -> Bool {
return lhs === rhs
}
final class View: UIView {
final class View: UIView, ComponentTaggedView {
private var component: FlipButtonContentComponent?
public func matches(tag: Any) -> Bool {
if let component = self.component, let componentTag = component.tag {
let tag = tag as AnyObject
if componentTag === tag {
return true
}
}
return false
}
private let backgroundView: BlurredBackgroundView
private let icon = SimpleLayer()