Post

Replies

Boosts

Views

Activity

List within a DisclosureGroup
Hello, I need to create a NavigationView with a List inside a DisclosureGroup but the list is not visible. Actually I did see one time a grey area of a list background. This is the code what I use. @State private var revealDetails = false var body: some View { VStack { DisclosureGroup("Show some Text", isExpanded: $revealDetails) { VStack{ Text("Some Text...") .padding() .lineLimit(5) Divider() List(){ Text("Hello, world!").padding() Text("Hello, world!").padding() Text("Hello, world!").padding() }.listStyle(SidebarListStyle()) Divider() } .padding() } Spacer() } } } Any suggestions, or could it be a beta SwiftUI 2 bug? Thank you
2
0
3.3k
Jul ’20
Saving a @StateObject and View/Content state
After reading and using a @StateObject in a test, I have a question. Is there an easy way to save locally the state of a view with content like some behaviour of the @StateObject, to reuse it after a restart of a program? Like Safari and some app's remembers what you did do on a web page, I would like to save f.e a ClientView and SubViews their (view)state and (text/selection)content so I can put the clientView in the original state after a restart. Are there comments or any insight on this somewhere?
0
0
305
Aug ’20
XCode 15RC and iOS16 - no device in the device list
Hello Using XCode 15, to create a device iPhone12 with iOS16 works and it did download the simulator , but it doesn’t show up in the device build list and not in the preview device list. Using a MBP and MM-M1, in both it doesn’t show up. How can I get this to work? I did set the device to show up as automatic , alway and even never; but none of the settings are working. Is this a XCode bug or… Is this fixable, should I remove a xml file to get a clean start?
0
0
416
Sep ’23