// Copyright 2018-Present Shin Yamamoto. All rights reserved. MIT license. import Foundation import FloatingPanel extension FloatingPanelState { static let lastQuart: FloatingPanelState = FloatingPanelState(rawValue: "lastQuart", order: 750) static let firstQuart: FloatingPanelState = FloatingPanelState(rawValue: "firstQuart", order: 250) } class FloatingPanelLayoutWithCustomState: FloatingPanelBottomLayout { override var anchors: [FloatingPanelState: FloatingPanelLayoutAnchoring] { return [ .full: FloatingPanelLayoutAnchor(absoluteInset: 0.0, edge: .top, referenceGuide: .safeArea), .lastQuart: FloatingPanelLayoutAnchor(fractionalInset: 0.75, edge: .bottom, referenceGuide: .safeArea), .half: FloatingPanelLayoutAnchor(fractionalInset: 0.5, edge: .bottom, referenceGuide: .safeArea), .firstQuart: FloatingPanelLayoutAnchor(fractionalInset: 0.25, edge: .bottom, referenceGuide: .safeArea), .tip: FloatingPanelLayoutAnchor(absoluteInset: 20.0, edge: .bottom, referenceGuide: .safeArea), ] } }