mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 03:40:18 +00:00
Cleanup
This commit is contained in:
parent
f27bc011dc
commit
9cb0610c4b
@ -227,9 +227,7 @@ public extension ContainedViewLayoutTransition {
|
|||||||
case .spring:
|
case .spring:
|
||||||
timingFunction = kCAMediaTimingFunctionSpring
|
timingFunction = kCAMediaTimingFunctionSpring
|
||||||
}
|
}
|
||||||
node.layer.animateBoundsOriginXAdditive(from: offset, to: 0.0, duration: duration, timingFunction: timingFunction, completion: { completed in
|
node.layer.animateBoundsOriginXAdditive(from: offset, to: 0.0, duration: duration, timingFunction: timingFunction)
|
||||||
print("completed \(completed)")
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -384,6 +384,18 @@ open class ViewControllerPresentationArguments {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@available(iOSApplicationExtension 9.0, *)
|
||||||
|
public func registerForPreviewingNonNative(with delegate: UIViewControllerPreviewingDelegate, sourceView: UIView, theme: PeekControllerTheme) {
|
||||||
|
if self.traitCollection.forceTouchCapability != .available {
|
||||||
|
if self.previewingContext == nil {
|
||||||
|
let previewingContext = SimulatedViewControllerPreviewing(theme: theme, delegate: delegate, sourceView: sourceView, node: self.displayNode, present: { [weak self] c, a in
|
||||||
|
self?.presentInGlobalOverlay(c, with: a)
|
||||||
|
})
|
||||||
|
self.previewingContext = previewingContext
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@available(iOSApplicationExtension 9.0, *)
|
@available(iOSApplicationExtension 9.0, *)
|
||||||
open override func unregisterForPreviewing(withContext previewing: UIViewControllerPreviewing) {
|
open override func unregisterForPreviewing(withContext previewing: UIViewControllerPreviewing) {
|
||||||
if self.previewingContext != nil {
|
if self.previewingContext != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user