This commit is contained in:
Ali 2022-02-18 20:13:02 +04:00
parent ac8e9a0b9c
commit 9750f70987
4 changed files with 21 additions and 24 deletions

View File

@ -7,13 +7,6 @@ private struct Vector2 {
var y: Float
}
private final class NullActionClass: NSObject, CAAction {
@objc func run(forKey event: String, object anObject: Any, arguments dict: [AnyHashable : Any]?) {
}
}
private let nullAction = NullActionClass()
private final class ParticleLayer: CALayer {
let mass: Float
var velocity: Vector2

View File

@ -1,11 +1,11 @@
import UIKit
private final class NullActionClass: NSObject, CAAction {
@objc func run(forKey event: String, object anObject: Any, arguments dict: [AnyHashable : Any]?) {
public final class NullActionClass: NSObject, CAAction {
@objc public func run(forKey event: String, object anObject: Any, arguments dict: [AnyHashable : Any]?) {
}
}
private let nullAction = NullActionClass()
public let nullAction = NullActionClass()
open class SimpleLayer: CALayer {
override open func action(forKey event: String) -> CAAction? {
@ -24,3 +24,21 @@ open class SimpleLayer: CALayer {
fatalError("init(coder:) has not been implemented")
}
}
open class SimpleShapeLayer: CAShapeLayer {
override open func action(forKey event: String) -> CAAction? {
return nullAction
}
override public init() {
super.init()
}
override public init(layer: Any) {
super.init(layer: layer)
}
required public init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}

View File

@ -277,13 +277,6 @@ open class TransformImageNode: ASDisplayNode {
}
}
private final class NullActionClass: NSObject, CAAction {
@objc func run(forKey event: String, object anObject: Any, arguments dict: [AnyHashable : Any]?) {
}
}
private let nullAction = NullActionClass()
private class CaptureProtectedContentLayer: AVSampleBufferDisplayLayer {
override func action(forKey event: String) -> CAAction? {
return nullAction

View File

@ -60,13 +60,6 @@ public final class GridMessageSelectionNode: ASDisplayNode {
}
}
private final class NullActionClass: NSObject, CAAction {
@objc func run(forKey event: String, object anObject: Any, arguments dict: [AnyHashable : Any]?) {
}
}
private let nullAction = NullActionClass()
public final class GridMessageSelectionLayer: CALayer {
private var selected = false
private let checkLayer: CheckLayer