Following is a row item within a section of CPListTemplate,
CPListItem(text: "Station 1", detailText: "Details\nforStation 1")
In the above, is it possible to display data in three lines? I have seen couple of CarPlay apps that do it within a list. However, I am not sure how this can be done. Kindly suggest some ideas
Currently I have the below,
I want to achieve the below, three lines with a row
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
I have a list of items/cells where each item has many elements within it including a button. On tap of a cell, it navigates to screen say ViewA. And on tap of button within the cell, it goes to ViewB. However, on tap of the cell, instead of navigating to ViewA, it randomly navigates to ViewB even though the nav link isActive is disabled. Please suggest!
ViewA - List view
`List {
ForEach(testData, id: \.self) { index in
ZStack {
NavigationLink("", destination:ViewA()).opacity(0)
ViewAListItem()
}.listRowBackground(Color.clear)
.listRowSeparator(.hidden)
.background(.clear)
}
}`
In another file,
struct ViewAListItem: View {
@State var test: Bool = false
/// some other code
///
///
///
Button(action: {
test = true
}) {
Text("Testing")
}.background(
NavigationLink("", destination: ViewB(), isActive: $test).opacity(0)
)
}
Here even though the button is not tapped, variable test is true and navigating to ViewB on tap of cell which should launch ViewAListItem instead. Any issue with this?