DropDown is a package for Swift that creates a drop down view that you can dismiss by dragging it upwards.
- Add it to your project. Click the project name in the file section.
- Go in package dependencies.
- Click on "+".
- Enter "https://github.com/Yoddikko/DropDown" url in the search bar.
- Click add package.
- Add "import DropDown".
- Create a DropDown element.
- Enter all parameters.
BackgroundView()
.overlay {
DropDown(size: .small, curtainColor: .black, chevronColor: .white, content: {
Text(loremIpsum)
})
}
- size - It his the height of the closed view
size: .small, .medium, .half
- curtainColor - It is the background color of the view
curtainColor: Color
- chevronColor - It is the color of the chevron arrow
chevronColor: Color
Thanks to @Carminepo2 for helping me fixing some bugs.