Post

Replies

Boosts

Views

Activity

Reply to High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
I have come up with this singleton that holds the values. @MainActor private final class SafeAreaInsetsHolder { static let shared = SafeAreaInsetsHolder() let topSafeAreaInset: CGFloat let bottomSafeAreaInset: CGFloat private init() { if let window = UIApplication.shared.mainWindow { topSafeAreaInset = window.safeAreaInsets.top bottomSafeAreaInset = window.safeAreaInsets.bottom } else { topSafeAreaInset = 0 bottomSafeAreaInset = 0 } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Reply to High CPU Usage in SwiftUI UIHostingController on iOS 26 Beta
I can also see some warnings in console. Observable object key path '\_UICornerProvider.<computed 0x00000001852600cc (Optional<UICoordinateSpace>)>' changed; performing invalidation for [layout] of: <UILayoutContainerView: 0x104eda520; frame = (0 0; 402 874); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x60000036ef80>; backgroundColor = kCGColorSpaceModelRGB 0.0352941 0.0352941 0.0352941 1; layer = <CALayer: 0x600000e2f660>> Observation tracking feedback loop detected! Make a symbolic breakpoint at UIObservationTrackingFeedbackLoopDetected to catch this in the debugger. Refer to the console logs for details about recent invalidations; you can also make a symbolic breakpoint at UIObservationTrackingInvalidated to catch invalidations in the debugger. Object receiving repeated [layout] invalidations: <UILayoutContainerView: 0x104eda520; frame = (0 0; 402 874); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x60000036ef80>; backgroundColor = kCGColorSpaceModelRGB 0.0352941 0.0352941 0.0352941 1; layer = <CALayer: 0x600000e2f660>>
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25
Reply to UIApplication.shared.open iOS 18
Same here, it seems that Swift does not understand which method to use because of default options and completion parameters, so I managed to use it like that: UIApplication.shared.open(url, options: []) But still, this is a bug and should not be like that.
Topic: UI Frameworks SubTopic: UIKit
Sep ’24