Skip to content

Commit

Permalink
Added BottomSheet additional minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
VerticalHeretic committed Sep 5, 2022
1 parent 5c70106 commit feb3a60
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion iOS16-SwiftUI-Showdown/Screens/BottomSheetScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@

import SwiftUI

struct CustomDetent: CustomPresentationDetent {

static func height(in context: Context) -> CGFloat? {
return 210.37
}
}

struct BottomSheetScreen: View {
var feature: Feature
@State private var showSheet = false
private let detents: Set<PresentationDetent> = [.medium, .large, .fraction(0.69), .fraction(0.2)]
private let detents: Set<PresentationDetent> = [.medium, .large, .fraction(0.69), .fraction(0.2), .custom(CustomDetent.self) ]
@State private var selectedDetent: PresentationDetent = .medium

var body: some View {
Expand Down

0 comments on commit feb3a60

Please sign in to comment.