mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
29 lines
735 B
Swift
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
|
|
}
|