mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Various improvements
This commit is contained in:
@@ -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?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user