1 //  Copyright (c) 2018, Applidium. All rights reserved
2 //  OverlayTranslationController.swift
3 //  OverlayContainer
4 //
5 //  Created by Gaétan Zanella on 29/11/2018.
6 //
7 
8 import UIKit
9 
10 enum OverlayTranslationPosition {
11     case top, bottom, inFlight, stationary
12 }
13 
14 protocol OverlayTranslationController: AnyObject {
15     var lastTranslationEndNotchIndex: Int { get }
16     var translationHeight: CGFloat { get }
17     var translationPosition: OverlayTranslationPosition { get }
18 
isDraggablenull19     func isDraggable(at point: CGPoint, in coordinateSpace: UICoordinateSpace) -> Bool
20 
21     func overlayHasReachedANotch() -> Bool
22 
23     func startOverlayTranslation()
24     func dragOverlay(withOffset offset: CGFloat, usesFunction: Bool)
25     func endOverlayTranslation(withVelocity velocity: CGPoint)
26 }
27