Post

Replies

Boosts

Views

Activity

Child view doesn't get the contextMenu but its parent view does
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?
0
0
269
Aug ’23
NavigationView的sheet上如何显示resize indicator
resize indicator什么样 红色箭头所指的就是resize indicator。 如何显示这个indicator 错误的做法是使用一个色块当作indicator。 正确的做法: NavigationStack { MyView() .navigationTitle("愿景") .sheet(isPresented: $showAddVisionView) { MySheetView() .presentationDetents([.large, .medium]) // 这里如果只有一种大小就不会显示resize indicator,如果有多个大小选项就会显示resize indicator } }
0
0
244
Sep ’23
The app's In-App Purchases and Subscriptions section mentioned in App Store Connect could not be found
I created a subscription in App Store Connect. I'd like to submit it for review along with my new app. App Store Connect prompts me to select it from the app's In-App Purchases and Subscriptions section on the version page before submitting the version to App Review. But I didn't find the In-App Purchases and Subscriptions section in the version page. I'm not sure if the version page as I understand it is the same as the version page as App Store Connect. So, can anyone tell me where I can find the In-App Purchases and Subscriptions section.
1
0
142
2w