OutlineGroup And DisclosureGroup
Welcome Guys,
Always Apple comes up with new things in SwiftUI.
1.Tree structure content using OutlineGroup
2.Hide and reveal content using DisclosureGroup
OutlineGroup
If you want make tree structure no worries in swiftUI apple had introduced new hierarchical view.
Use an outline group when you need a view that can represent a hierarchy of data by using disclosure views. This allows the user to navigate the tree structure by using the disclosure views to expand and collapse branches.
DisclosureGroup
If you want hide and reveal content so no more manually manage business code by Devs, SwiftUI has a dedicated DisclosureGroup view that presents a disclosure indicator and content inside and just bound with boolean property.
Let’s look code and demo below 👇👇👇👇👇 !!!
Just use it. w00t! How cool is that and all done with just a few lines of code!
If you have any comments or questions, please respond below! I’d love to hear from you.
