11.7 C
Canberra
Wednesday, November 12, 2025

Any option to conceal the row in white background in Listing when utilizing Context Menu SwiftUI?


Is there any option to conceal the row that’s in white background when context menu seems? I do know it is due to Listing. I had to make use of Listing as a result of including ScrollView with LazyVStack on iOS 17, 18 had points when contents with various dimension seems like when keyboard dismissed the LazyVStack will not snap again. So I went with Listing.

So when highlighting the particular message I wish to know is it potential to cover that row behind it. If not then I feel I’ve to relay on UIKit for UITableVIew or UICollectionView which I have to study first to implement this. LazyVStack is massive NO for me.

Any option to conceal the row in white background in Listing when utilizing Context Menu SwiftUI?

Listing {
  ForEach(Array(messagesViewModel.messages.enumerated()), id: .aspect.messageIndex) {
    index, message in
    let isBeginning = message.messageIndex == messagesViewModel.messages.first?.messageIndex

    let isLast = message.messageIndex == messagesViewModel.messages.final?.messageIndex

    let hasBogey = messagesViewModel.bogeyChatSuggestions != nil

    chatMessageView(for: message, isBeginningOfSection: isBeginning)
      .buttonStyle(.plain)
      .id(message.messageIndex)
      .padding(.backside, hasBogey ? 0 : (isLast ? 65 : 0))
      .listRowSeparator(.hidden)
      .listRowBackground(Shade.clear)
      .contextMenu {
        Button("Copy") { UIPasteboard.basic.string = textual content }
      }
  }

  bogeyChatSuggestionView
    .id(messagesViewModel.bogeyChatSuggestions?.id)
    .listRowSeparator(.hidden)
    .listRowBackground(Shade.clear)
}
.buttonStyle(.plain)
.listStyle(.plain)
.scrollContentBackground(.hidden)
.scrollIndicators(.hidden)
.background(Shade.white)

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles