ListCell SwiftUI - admiral-team/admiralui-ios GitHub Wiki
A view that displays leading, trailing and image views
public struct ListCell<L, C, T>: ListViewCell where L: View , C: View, T: View
ListCell
allows you to dynamically build cells by leading, center and trailing rules.
ListCell<EmptyView, SubtitleTitleListView, EmptyView>(
centerView: {
SubtitleTitleListView(
title: "Title",
subtitle: "Subtitle"
)
}
)
ListCell(
centerView: { TitleListView(title: item.title) },
trailingView: { ArrowListView() }
)
You can also control highlighting by adding isHighlighted property:
ListCell(
centerView: { TitleListView(title: item.title) },
trailingView: { ArrowListView() },
isHighlighted: .constant(true)
)
ListCell(
leadingView: { ImageCardListView(cardImage: Image(uiImage: Asset.Card.rnb.image)) },
centerView: { TitleListView(title: "Title") },
trailingView: { IconListView(image: Image(uiImage: Asset.Card.rnb.image)) }
)
You can also mark cell as selected by adding isSelected property:
ListCell(
leadingView: { ImageCardListView(cardImage: Image(uiImage: Asset.Card.rnb.image)) },
centerView: { TitleListView(title: "Title") },
trailingView: { IconListView(image: Image(uiImage: Asset.Card.rnb.image)) },
isSelected: .constant(false)
)
You can help us to find bugs or ask us to add features.
- To start
issue
please use ready-made templates. - To make changes to the repository, you need to create a
fork
of the project, make changes to the code and create apull request
in our project. You can read more about this in the Github documentation.