Swiftgram/Display/PeekControllerContent.swift
Peter Iakovlev 377c25943b no message
2018-03-02 20:43:26 +04:00

26 lines
671 B
Swift

import Foundation
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 isEqual(to: PeekControllerContent) -> Bool
}
public protocol PeekControllerContentNode {
func updateLayout(size: CGSize, transition: ContainedViewLayoutTransition) -> CGSize
}