Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Popover clips in iOS18
Cannot find the popover(isPresented:attachmentAnchor:content:) anymore, https://developer.apple.com/documentation/swiftui/view/popover(ispresented:attachmentanchor:arrowedge:content:)?changes=latest_major Looks like it's changed back
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’25
Reply to SwiftUI Popover clips in iOS18
Thanks for providing the solution, I was wondering what's the root cause, didn't realize the new API that causing this. quick adding the additional func with Item: Identifiable @ViewBuilder public func autoEdgePopover<Item: Identifiable, Content: View>( item: Binding<Item?>, attachmentAnchor: PopoverAttachmentAnchor = .rect(.bounds), @ViewBuilder content: @escaping (Item) -> Content ) -> some View { if #available(iOS 18, *) { self .popover(item: item, attachmentAnchor: attachmentAnchor, content: content) } else { self .popover(item: item, attachmentAnchor: attachmentAnchor, content: content) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24