WhatsNewListView
public struct WhatsNewListView
extension WhatsNewListView: View
extension WhatsNewListView: _ViewEmptyChecking
WhatsNewListView is used to inform users of new features during the onboarding process. It takes a collection of views and displays them as rows within a list. Any type of view can be provided, but we recommend using WhatsNewListItem views.
Usage
struct WhatsNewExample: View {
@State var presentListViewExample = false
var body: some View {
Button("Present View") {
presentListViewExample.toggle()
}
.sheet(isPresented: $presentListViewExample, content: {
WhatsNewListViewExample()
})
}
}
struct WhatsNewListViewExample: View {
@Environment(\.dismiss) var dismiss
var body: some View {
WhatsNewListView(whatsNewListItems: {
WhatsNewListItem(detailImage: Image("wheel").resizable(), title: "List item 1", subtitle: "Subtitle text")
WhatsNewListItem(detailImage: Image("ProfilePic").resizable(), title: "List item 2")
WhatsNewListItem(title: "List item 3", subtitle: "Subtitle text")
}, didClose: {
self.dismiss()
}, didFinish: {
self.dismiss()
})
}
}
-
Undocumented
Declaration
Swift
public init(@IndexedViewBuilder whatsNewListItems: () -> any IndexedViewContainer = { EmptyView() }, didClose: (() -> Void)? = nil, didFinish: (() -> Void)? = nil, componentIdentifier: String? = WhatsNewListView.identifier) -
Undocumented
Declaration
Swift
static let identifier: String -
Undocumented
Declaration
Swift
init(whatsNewListItems: [WhatsNewListItem] = [], didClose: (() -> Void)? = nil, didFinish: (() -> Void)? = nil) -
Undocumented
Declaration
Swift
init(_ configuration: WhatsNewListViewConfiguration) -
Declaration
Swift
@MainActor public var body: some View { get } -
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }