From b3a6d543ac7c5aacc4287d121ab6c86aac42a6da Mon Sep 17 00:00:00 2001 From: Tieda Wei Date: Wed, 29 Apr 2020 20:31:34 -0400 Subject: [PATCH] Update Usage in README --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 492962e..d63a2eb 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,19 @@ iOS 13 ## Usage -Simply wrap `BottomSheet` in `ZStack` ```swift -@State var isPresented = true - -ZStack { - Text("Hi") - BottomSheet(isPresented: $isPresented, maxHeight: 300) { - List(0..<20) { Text("\($0)") } +NavigationView { + List(0..<20) { + Text("\($0)") + } + .bottomSheet(isPresented: self.$isPresented, maxHeight: 300) { + List(20..<40) { Text("\($0)") } } + .navigationBarTitle("Bottom Sheet") + .navigationBarItems( + trailing: Button(action: { self.isPresented = true }) { Text("Show") } + ) } ``` You can also set `topBarBackgroundColor` and `contentBackgroundColor` in `initializer` as you want.