07ae324586
* Clean up Samples and Maps examples * Rename the root view controller in Maps/Stocks/SampleObjC examples * Reorder resource file references * Rename examples' bundle ids with `example` domain. * Remove 'Run Script' to modify CFBundleVersion: now this has not been used for testing since unit tests were added * Revise methods to handle content view controllers in UseCaseController * Fix a bug on PagePanelController
23 lines
1.1 KiB
Swift
23 lines
1.1 KiB
Swift
// 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),
|
|
]
|
|
}
|
|
}
|
|
|