Post

Replies

Boosts

Views

Activity

Reply to Popover in Toolbar Causes Crash in Catalyst App on macOS 26
Here is my work around for UIKit extension UIViewController { @objc func configureAsPopoverWith(sender: Any?) { self.modalPresentationStyle = .popover var enableZoom: Bool = true var source: Any? = sender #if targetEnvironment(macCatalyst) // PopOver with Zoom crashes for macOS 26 if #available(iOS 26.0, *), let view = (sender as? UIBarButtonItem)?.value(forKey: "view") as? UIView { source = view } enableZoom = false #endif if let sourceView = source as? UIView { self.popoverPresentationController?.sourceView = sourceView self.popoverPresentationController?.sourceRect = sourceView.bounds if #available(iOS 18.0, *), enableZoom { self.preferredTransition = .zoom { _ in sourceView } } } else if let sourceItem = source as? UIBarButtonItem { self.popoverPresentationController?.barButtonItem = sourceItem } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to Popover in Toolbar Causes Crash in Catalyst App on macOS 26
I'm experiencing the exact same crash in UIKit. With UIBarButtonItems and Popovers. On Mac Catalyst app build with Xcode 26.2 (17C52) on Tahoe 26.2. Same will happen with UIView as a source when presenting the a UIViewController if a zoom transition is set vc.preferredTransition = .zoom { _ in sendingView } Setting the info.plist UIDesignRequiresCompatibility to YES, prevents the default zoom transition and shows the popup with arrows.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w