Swiftgram/submodules/Display/Source/PeekControllerContent.swift
2019-11-14 23:27:44 +04:00

29 lines
735 B
Swift

import Foundation
import UIKit
import AsyncDisplayKit
public enum PeekControllerContentPresentation {
case contained
case freeform
}
public enum PeerkControllerMenuActivation {
case drag
case press
}
public protocol PeekControllerContent {
func presentation() -> PeekControllerContentPresentation
func menuActivation() -> PeerkControllerMenuActivation
func menuItems() -> [PeekControllerMenuItem]
func node() -> PeekControllerContentNode & ASDisplayNode
func topAccessoryNode() -> ASDisplayNode?
func isEqual(to: PeekControllerContent) -> Bool
}
public protocol PeekControllerContentNode {
func updateLayout(size: CGSize, transition: ContainedViewLayoutTransition) -> CGSize
}