Swiftgram/TelegramUI/GalleryFooterContentNode.swift
2018-04-11 23:43:31 +04:00

33 lines
1.3 KiB
Swift

import Foundation
import AsyncDisplayKit
import Display
import SwiftSignalKit
final class GalleryControllerInteraction {
let presentController: (ViewController, ViewControllerPresentationArguments?) -> Void
let dismissController: () -> Void
let replaceRootController: (ViewController, ValuePromise<Bool>?) -> Void
init(presentController: @escaping (ViewController, ViewControllerPresentationArguments?) -> Void, dismissController: @escaping () -> Void, replaceRootController: @escaping (ViewController, ValuePromise<Bool>?) -> Void) {
self.presentController = presentController
self.dismissController = dismissController
self.replaceRootController = replaceRootController
}
}
open class GalleryFooterContentNode: ASDisplayNode {
var requestLayout: ((ContainedViewLayoutTransition) -> Void)?
var controllerInteraction: GalleryControllerInteraction?
func updateLayout(width: CGFloat, leftInset: CGFloat, rightInset: CGFloat, bottomInset: CGFloat, contentInset: CGFloat, transition: ContainedViewLayoutTransition) -> CGFloat {
return 0.0
}
func animateIn(fromHeight: CGFloat, transition: ContainedViewLayoutTransition) {
}
func animateOut(toHeight: CGFloat, transition: ContainedViewLayoutTransition, completion: @escaping () -> Void) {
completion()
}
}