Last active
September 23, 2021 22:53
-
-
Save gtokman/494cdcf1b6d4c130e3cde7877e7d9e0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NavigationView { | |
List { | |
ForEach(viewModel.businesses) { business in | |
Text(business.name) | |
} | |
} | |
.listStyle(.plain) | |
.navigationTitle(Text("Boston")) | |
// Position a gradient at the bottom edge of a list | |
.safeAreaInset(edge: .bottom) { | |
Rectangle() | |
.fill(LinearGradient(colors: [.white, .white.opacity(0)], | |
startPoint: .bottom, | |
endPoint: .top)) | |
.frame(height: 90) | |
} | |
.ignoresSafeArea(edges: .bottom) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment