Various improvements

This commit is contained in:
Ilya Laktyushin
2023-11-22 03:24:33 +04:00
parent 31eb1081df
commit 90f09a13e4
134 changed files with 8488 additions and 3171 deletions

View File

@@ -153,129 +153,6 @@ open class ContextControllerSourceNode: ContextReferenceContentNode {
}
}
/*open class ContextControllerSourceNode: ASDisplayNode {
private var viewImpl: ContextControllerSourceView {
return self.view as! ContextControllerSourceView
}
public var contextGesture: ContextGesture? {
if self.isNodeLoaded {
return self.viewImpl.contextGesture
} else {
return nil
}
}
public var isGestureEnabled: Bool = true {
didSet {
if self.isNodeLoaded {
self.viewImpl.isGestureEnabled = self.isGestureEnabled
}
}
}
public var beginDelay: Double = 0.12 {
didSet {
if self.isNodeLoaded {
self.viewImpl.beginDelay = self.beginDelay
}
}
}
public var animateScale: Bool = true {
didSet {
if self.isNodeLoaded {
self.viewImpl.animateScale = self.animateScale
}
}
}
public var activated: ((ContextGesture, CGPoint) -> Void)? {
didSet {
if self.isNodeLoaded {
self.viewImpl.activated = self.activated
}
}
}
public var shouldBegin: ((CGPoint) -> Bool)? {
didSet {
if self.isNodeLoaded {
self.viewImpl.shouldBegin = self.shouldBegin
}
}
}
public var customActivationProgress: ((CGFloat, ContextGestureTransition) -> Void)? {
didSet {
if self.isNodeLoaded {
self.viewImpl.customActivationProgress = self.customActivationProgress
}
}
}
public weak var additionalActivationProgressLayer: CALayer? {
didSet {
if self.isNodeLoaded {
self.viewImpl.additionalActivationProgressLayer = self.additionalActivationProgressLayer
}
}
}
public var targetNodeForActivationProgress: ASDisplayNode? {
didSet {
if self.isNodeLoaded {
self.viewImpl.targetNodeForActivationProgress = self.targetNodeForActivationProgress
}
}
}
public var targetViewForActivationProgress: UIView? {
didSet {
if self.isNodeLoaded {
self.viewImpl.targetViewForActivationProgress = self.targetViewForActivationProgress
}
}
}
public var targetNodeForActivationProgressContentRect: CGRect? {
didSet {
if self.isNodeLoaded {
self.viewImpl.targetNodeForActivationProgressContentRect = self.targetNodeForActivationProgressContentRect
}
}
}
override public init() {
super.init()
self.setViewBlock({
return ContextControllerSourceView(frame: CGRect())
})
}
override open func didLoad() {
super.didLoad()
self.viewImpl.isGestureEnabled = self.isGestureEnabled
self.viewImpl.beginDelay = self.beginDelay
self.viewImpl.animateScale = self.animateScale
self.viewImpl.activated = self.activated
self.viewImpl.shouldBegin = self.shouldBegin
self.viewImpl.customActivationProgress = self.customActivationProgress
self.viewImpl.additionalActivationProgressLayer = self.additionalActivationProgressLayer
self.viewImpl.targetNodeForActivationProgress = self.targetNodeForActivationProgress
self.viewImpl.targetViewForActivationProgress = self.targetViewForActivationProgress
self.viewImpl.targetNodeForActivationProgressContentRect = self.targetNodeForActivationProgressContentRect
}
public func cancelGesture() {
if self.isNodeLoaded {
self.viewImpl.cancelGesture()
}
}
}*/
open class ContextControllerSourceView: UIView {
public private(set) var contextGesture: ContextGesture?