Created
August 5, 2020 12:41
-
-
Save amosgyamfi/a2a1b14114c2fac1d798d7ba5fddc3ae 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
// | |
// ContentView.swift | |
// Showing and hiding overflow/secondary content with DIsclosureGroup | |
// | |
// Created by Amos Gyamfi on 1.8.2020. | |
// | |
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
VStack(alignment: .leading) { | |
Text("Privacy FAQ") | |
.font(.largeTitle) | |
List{ | |
DisclosureGroup("How do you protect users?") { | |
Text("Downloading documents require authentication. So you will need to register to get access to all documents") | |
} | |
DisclosureGroup("What data is collected?") { | |
Text("Downloading documents require authentication. So you will need to register to get access to all documents") | |
} | |
DisclosureGroup("What hapends with my data?") { | |
Text("Downloading documents require authentication. So you will need to register to get access to all documents") | |
} | |
DisclosureGroup("How is the settings adjusted?") { | |
Text("Downloading documents require authentication. So you will need to register to get access to all documents") | |
} | |
DisclosureGroup("Where do I find the privacy?") { | |
Text("Downloading documents require authentication. So you will need to register to get access to all documents") | |
} | |
}.listStyle(InsetGroupedListStyle()).padding(/*@START_MENU_TOKEN@*/.all/*@END_MENU_TOKEN@*/, /*@START_MENU_TOKEN@*/10/*@END_MENU_TOKEN@*/) | |
}.padding(.horizontal, 20) | |
} | |
} | |
struct ContentView_Previews: PreviewProvider { | |
static var previews: some View { | |
ContentView() | |
.preferredColorScheme(.dark) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment