Posts

Post not yet marked as solved
0 Replies
175 Views
resize indicator什么样 红色箭头所指的就是resize indicator。 如何显示这个indicator 错误的做法是使用一个色块当作indicator。 正确的做法: NavigationStack { MyView() .navigationTitle("愿景") .sheet(isPresented: $showAddVisionView) { MySheetView() .presentationDetents([.large, .medium]) // 这里如果只有一种大小就不会显示resize indicator,如果有多个大小选项就会显示resize indicator } }
Posted
by wudiandy.
Last updated
.
Post not yet marked as solved
0 Replies
179 Views
What I Whant I'm making a component. This component is used to display a list of tags. I want a context menu to pop up on the tag when the user long-presses it. Like this: What I Got Here is My Code VStack(alignment: .leading) { ForEach(groupedItems, id: \.self) { itms in HStack { ForEach(itms, id: \.self) { tag in Text(tag.title ?? "") .font(.callout) .padding() .frame(height: 24.0) .frame(alignment: .center) .cornerRadius(100) .contextMenu { Button { deleteTheTag(tag) } label: { Label("Delete", systemImage: "trash") } } } } } } I tried several methods, but all failed. How should I modify my code?
Posted
by wudiandy.
Last updated
.
Post not yet marked as solved
0 Replies
190 Views
I see that many people have already asked this question. I asked this question again to let Apple notice this problem as soon as possible and add this feature in the next version.
Posted
by wudiandy.
Last updated
.