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
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:
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Playground with PDF
Use Xcode on Mac to open the Playground project, then create the xcassets file Add your assets to the xcassets Open the Playground file from Playground then you should be able to use the image and see the Assets section
Replies
Boosts
Views
Activity
Dec ’23