1 // Copyright (c) 2018, Applidium. All rights reserved 2 // ConcreteOverlayContainerContextTargetNotchPolicy.swift 3 // OverlayContainer 4 // 5 // Created by Gaétan Zanella on 28/11/2018. 6 // 7 8 import UIKit 9 10 struct ConcreteOverlayContainerContextTargetNotchPolicy: OverlayContainerContextTargetNotchPolicy { 11 let isDragging: Bool 12 let overlayViewController: UIViewController 13 let overlayTranslationHeight: CGFloat 14 let velocity: CGPoint 15 let notchHeightByIndex: [Int: CGFloat] 16 let reachableIndexes: [Int] 17 18 var notchIndexes: Range<Int> { 19 0..<notchHeightByIndex.count 20 } 21 heightnull22 func height(forNotchAt index: Int) -> CGFloat { 23 return notchHeightByIndex[index] ?? 0 24 } 25 } 26