Search results for

“swiftui”

17,106 results found

Post

Replies

Boosts

Views

Activity

How do I get content to blur behind a floating input bar, like Mail, Messages and other native apps do?
I have a chat app with a floating composer pill (NSGlassEffectView) pinned to the bottom of my content area. Messages scroll behind it. The pill looks fine but content behind it is completely clear. Fully legible text showing through, no frosting at all. Mail, Messages, Notes all have this frosted look where content behind a floating bar is blurred enough that you can't read it. That's what I'm going for. My scroll view has wantsLayer = true. I tried hasVerticalScroller = true + scrollerStyle = .overlay based on a tip I saw in another thread. No change. Is NSGlassEffectView supposed to blur what's behind it, or is the frosting in Apple's apps coming from the scroll edge effect? If it's the scroll edge effect, is there any way to trigger it for a custom floating view at the bottom of a scroll view? I can't find any AppKit API for this. I also spent time trying this in SwiftUI using .glassEffect() on macOS. Same result, the material renders nearly clear with no way to control the frosting level via any
0
0
147
6d
Reply to A few issues with the iPhone Photos app
(part 2 of 2) — continuing from my response above. The following performance considerations and progressive-loading techniques apply to both the SwiftUI path and the UIKit path described in part 1. PhotoKit performance tips (apply to both paths) A few details from the PHCachingImageManager and PHImageManager header comments that are easy to miss and matter for smoothness: Use PHImageRequestOptionsDeliveryModeOpportunistic (the default for async requests) — your result handler may be called multiple times: first with a fast, lower-quality result, then with the final high-quality image as it becomes available. This is what lets the grid feel instant even while the real thumbnails are still being prepared. From the header: client may get several image results when the call is asynchronous. Match your caching options exactly to your request options. From the startCachingImagesForAssets header comment: The options values shall exactly match the options values used in loading methods. If your targetSize, c
Topic: App & System Services SubTopic: General Tags:
6d
Reply to A few issues with the iPhone Photos app
Thanks for the positive observation about the Photos app's grid zoom — it is genuinely smooth, and wanting to replicate that in your own app is a reasonable aspiration. I spent some cycles putting together the following summary of APIs you may wish to explore pursuing this goal. A framing note before getting to the substance: I can't share the specifics of how Apple's Photos app is implemented internally, since that's not something DTS can detail. What I can do is point you to the public APIs and techniques that let you build similar grid-zoom behavior in your own app. The good news is that the public surface includes a class for the interpolated-zoom effect you're after. The SwiftUI path For a photo-library-backed grid with smooth pinch-to-zoom in SwiftUI, the building blocks are: LazyVGrid for the grid container (iOS 14 or later). MagnifyGesture (iOS 17 or later) for pinch input. MagnifyGesture replaced the now-deprecated MagnificationGesture; the gesture's value gives you the magnificatio
Topic: App & System Services SubTopic: General Tags:
6d
Reply to iOS 26 rendering gap on scroll surfaces — lower scroll view does not render
Thank you for your post. A portion of the screen failing to render is definitely not a great user experience, so it's important we find out exactly what's going on here and how to resolve it. I'll do everything I can to help us narrow this down and get it in front of the right team. 😃 [quote='827018021, jmpss, /thread/827018, /profile/jmpss'] We see it on both UIKit and SwiftUI scroll surfaces inside the same UITabBarController: [/quote] Since you mentioned you're unable to reproduce this locally, it would be helpful to gather as much detail as possible from the affected users for each of these apps That Apple Discussions thread has varying reports, with some users mentioning they were mid-search, while users in the Reddit thread report the issue is resolved by disabling Reachability. Once we narrow this down, I want to make sure I see exactly what you are seeing. Please file a bug report with Feedback Assistant and attach your project, screenshots, and steps to reproduce there as well, so I can sha
Topic: UI Frameworks SubTopic: General Tags:
1w
Reply to Glass effect interactive effect issue when used with concentric shapes
@kamilochel Thanks for the post, any chance you can create a new thread with those images, description and provide the full code of your view as I only see the children code .glassEffect only applies the shape mask and edge highlights to the glass material itself. The interactive highlight (the surface hover effect) calculates its own boundary based on the view's hit-testing shape, which often defaults to a capsule or standard rectangle if it encounters highly rounded corners without an explicit content shape. But I would appreciate if in a new thread you can provide the full code for SwiftUI engineers to help you with that effect. Thanks Albert
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
iOS 26 rendering gap on scroll surfaces — lower scroll view does not render
On iOS 26 (26.0–26.5), a rectangular region in the lower half of the screen sometimes does not render while the content underneath remains laid out and interactive — scrolling works, hit testing succeeds, and rows visibly emerge from behind the floating tab bar as you scroll. This is a render-server / compositor gap, not a layout or safe-area issue. We see it on both UIKit and SwiftUI scroll surfaces inside the same UITabBarController: UIKit: UICollectionView with UICollectionViewFlowLayout (sectionInsetReference = .fromSafeArea) SwiftUI: List(.plain) nested in TabView(.page) inside a UIHostingController Confirmed on iPhone 16 Pro, iPhone 17 Pro, iPhone 13 Pro Max. Community threads (linked below) report the same symptom in Messages, Notes, Safari, Mail, and the App Store. Questions for Apple Is this acknowledged as an OS-level regression, and is a fix targeted for an upcoming iOS 26.x release? Is there a deterministic repro? We've tried background/foreground cycles, push notifications mid-s
2
0
214
1w
xcodebuild test (CLI) does not sync .storekit to storekitd on iOS 26.5 — SKTestSession unusable in CI
On iOS 26.5 simulator runtime, running UI tests via xcodebuild test from the command line does not push the scheme's StoreKitConfigurationFileReference to the destination simulator's storekitd AppGroup Octane container. As a consequence, SKTestSession(configurationFileNamed:) either silently falls through to the production App Store (surfacing a Sign in to Apple Account SpringBoard alert during paywall tests), or throws SKInternalErrorDomain Code=3 Error saving configuration file if you call any SKTestSession instance method. The same project, same scheme, same .storekit file works correctly when launched via Xcode IDE (Cmd+R / Cmd+U) — which uses DVTDevice.handleStoreKitConfigurationSyncForBundleID:configurationFilePath: via an internal IDELaunchSession XPC path that the public xcodebuild CLI does not invoke. This regression makes StoreKit Test unusable in CI for any project using xcodebuild test or xcodebuild test-without-building against an iOS 26.5 simulator. Environment macOS: 26.x Xcode: 26.4.1 (25E253)
2
0
154
1w
SwiftUI Liquid Glass Menu briefly turns black after dismissing before returning to transparent glass
Hi, I’m seeing a visual issue with a SwiftUI Menu styled with Liquid Glass on iOS 26. I have a top bar control where a Menu is inside a GlassEffectContainer. The menu label uses .glassEffect(.regular.interactive()), glassEffectID, and glassEffectUnion. The control normally looks translucent, matching the background correctly. But when I open the menu and then dismiss it, the glass control briefly becomes solid black for a moment before returning to the expected transparent/glass appearance. This is visible especially on a colorful/blurred background: Before opening the menu: the control is transparent Liquid Glass. Open the SwiftUI Menu. Dismiss the menu. The menu label/control briefly renders as a black pill. After a short delay, it returns to the correct transparent glass style. Here is the simplified structure: @Namespace private var namespace GlassEffectContainer(spacing: 18) { VStack(spacing: 4) { Menu { Button { selectedMode = .automatic } label: { Label(Automatic, systemImage: wand.an
0
0
172
1w
Reply to AVAudioSession gets interrupted when closing a window
I have the same issue in visionOS 26, but in the context of the SwiftUI pushWindow API. Repro steps: App launches with window A visible. Window A users AVAudioPlayer to play continuous background audio. The app calls pushWindow, presenting window B. The audio stops. At this point AVAudioSession.interruptionNotification is received twice. A workaround is to resume the audio when AVAudioSession.interruptionNotification is received. This sounds glitchy.
Topic: Spatial Computing SubTopic: General Tags:
1w
Reply to Inexplicable Metal crash ever since iOS 26.5 beta 4
Thanks for posting and for sharing the repo — being able to look at the actual code makes a real difference here. The phone-restart class of crash matters. App-level Metal exceptions normally crash the app, not the device. A full phone reboot from a compute shader means whatever's failing crossed out of user-space into the GPU driver or kernel. That can happen two ways: A driver-side bug provoked by some specific user-space pattern, which would be a Metal/driver issue Apple needs to address. Memory corruption in your app — for example, an over-write of an MTLBuffer's contents past its allocated size, a stale gpuResourceID for a resource that's been freed, a race between threads populating argument-table entries, or wrong format/stride assumptions — that lands the GPU on garbage data and the driver panics. Allocator layouts and hardening change between iOS versions, so a dormant memory issue under beta 3 can become a reliable kernel panic under beta 4. The worked, then stopped working timing fits this case too
Topic: Graphics & Games SubTopic: Metal Tags:
1w
Reply to SwiftUI template in Instruments 26.4.1 shows empty channels on iOS 26.4.2 device — even with a minimal TimelineView repro
Hi there, Thanks for reaching out. That is certainly unexpected - you are doing everything correctly. It seems that the presence of SwiftUI recording is making the entire file captured invalid for some reason. To investigate this issue further, could you please file a feedback with iOS sysdiagnose attached? Additionally, please go to Instruments Settings and click 'Attach supporting files', record again, attach .trace file to the feedback report. This should give us enough diagnostics to understand your issue further and fix it. Thanks, Kacper
1w
SwiftUI Canvas ring animation briefly rotates backward after app returns from background
Hi, I have a SwiftUI work time screen with a rotating ring (60 tick marks, Canvas-based). While the app stays in foreground, rotation is fine. After the app is in background for a while and comes back to foreground, I consistently see one visual glitch: the ring makes one very short step in the opposite direction once then continues rotating clockwise normally So this is not a crash, only a visual reverse tick on resume. What I expect: no direction change after foreground resume continuous clockwise motion What I already tried: withAnimation(.linear(...).repeatForever(...)) + restart on scenePhase TimelineView (.animation and .periodic) with time-based angle angle with and without modulo wrapping wall-clock and monotonic time sources rotation via rotationEffect and also via Canvas geometry warmup delays after resume restoring original ring visuals (long/short tick marks) The effect is still reproducible. Question: What is the correct SwiftUI approach to implement a continuously rotating ring
0
0
171
1w
How do I get content to blur behind a floating input bar, like Mail, Messages and other native apps do?
I have a chat app with a floating composer pill (NSGlassEffectView) pinned to the bottom of my content area. Messages scroll behind it. The pill looks fine but content behind it is completely clear. Fully legible text showing through, no frosting at all. Mail, Messages, Notes all have this frosted look where content behind a floating bar is blurred enough that you can't read it. That's what I'm going for. My scroll view has wantsLayer = true. I tried hasVerticalScroller = true + scrollerStyle = .overlay based on a tip I saw in another thread. No change. Is NSGlassEffectView supposed to blur what's behind it, or is the frosting in Apple's apps coming from the scroll edge effect? If it's the scroll edge effect, is there any way to trigger it for a custom floating view at the bottom of a scroll view? I can't find any AppKit API for this. I also spent time trying this in SwiftUI using .glassEffect() on macOS. Same result, the material renders nearly clear with no way to control the frosting level via any
Replies
0
Boosts
0
Views
147
Activity
6d
Reply to A few issues with the iPhone Photos app
(part 2 of 2) — continuing from my response above. The following performance considerations and progressive-loading techniques apply to both the SwiftUI path and the UIKit path described in part 1. PhotoKit performance tips (apply to both paths) A few details from the PHCachingImageManager and PHImageManager header comments that are easy to miss and matter for smoothness: Use PHImageRequestOptionsDeliveryModeOpportunistic (the default for async requests) — your result handler may be called multiple times: first with a fast, lower-quality result, then with the final high-quality image as it becomes available. This is what lets the grid feel instant even while the real thumbnails are still being prepared. From the header: client may get several image results when the call is asynchronous. Match your caching options exactly to your request options. From the startCachingImagesForAssets header comment: The options values shall exactly match the options values used in loading methods. If your targetSize, c
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
6d
Reply to A few issues with the iPhone Photos app
Thanks for the positive observation about the Photos app's grid zoom — it is genuinely smooth, and wanting to replicate that in your own app is a reasonable aspiration. I spent some cycles putting together the following summary of APIs you may wish to explore pursuing this goal. A framing note before getting to the substance: I can't share the specifics of how Apple's Photos app is implemented internally, since that's not something DTS can detail. What I can do is point you to the public APIs and techniques that let you build similar grid-zoom behavior in your own app. The good news is that the public surface includes a class for the interpolated-zoom effect you're after. The SwiftUI path For a photo-library-backed grid with smooth pinch-to-zoom in SwiftUI, the building blocks are: LazyVGrid for the grid container (iOS 14 or later). MagnifyGesture (iOS 17 or later) for pinch input. MagnifyGesture replaced the now-deprecated MagnificationGesture; the gesture's value gives you the magnificatio
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
6d
Reply to iOS 26 rendering gap on scroll surfaces — lower scroll view does not render
Thank you for your post. A portion of the screen failing to render is definitely not a great user experience, so it's important we find out exactly what's going on here and how to resolve it. I'll do everything I can to help us narrow this down and get it in front of the right team. 😃 [quote='827018021, jmpss, /thread/827018, /profile/jmpss'] We see it on both UIKit and SwiftUI scroll surfaces inside the same UITabBarController: [/quote] Since you mentioned you're unable to reproduce this locally, it would be helpful to gather as much detail as possible from the affected users for each of these apps That Apple Discussions thread has varying reports, with some users mentioning they were mid-search, while users in the Reddit thread report the issue is resolved by disabling Reachability. Once we narrow this down, I want to make sure I see exactly what you are seeing. Please file a bug report with Feedback Assistant and attach your project, screenshots, and steps to reproduce there as well, so I can sha
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
1w
Reply to Glass effect interactive effect issue when used with concentric shapes
@kamilochel Thanks for the post, any chance you can create a new thread with those images, description and provide the full code of your view as I only see the children code .glassEffect only applies the shape mask and edge highlights to the glass material itself. The interactive highlight (the surface hover effect) calculates its own boundary based on the view's hit-testing shape, which often defaults to a capsule or standard rectangle if it encounters highly rounded corners without an explicit content shape. But I would appreciate if in a new thread you can provide the full code for SwiftUI engineers to help you with that effect. Thanks Albert
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1w
iOS 26 rendering gap on scroll surfaces — lower scroll view does not render
On iOS 26 (26.0–26.5), a rectangular region in the lower half of the screen sometimes does not render while the content underneath remains laid out and interactive — scrolling works, hit testing succeeds, and rows visibly emerge from behind the floating tab bar as you scroll. This is a render-server / compositor gap, not a layout or safe-area issue. We see it on both UIKit and SwiftUI scroll surfaces inside the same UITabBarController: UIKit: UICollectionView with UICollectionViewFlowLayout (sectionInsetReference = .fromSafeArea) SwiftUI: List(.plain) nested in TabView(.page) inside a UIHostingController Confirmed on iPhone 16 Pro, iPhone 17 Pro, iPhone 13 Pro Max. Community threads (linked below) report the same symptom in Messages, Notes, Safari, Mail, and the App Store. Questions for Apple Is this acknowledged as an OS-level regression, and is a fix targeted for an upcoming iOS 26.x release? Is there a deterministic repro? We've tried background/foreground cycles, push notifications mid-s
Replies
2
Boosts
0
Views
214
Activity
1w
xcodebuild test (CLI) does not sync .storekit to storekitd on iOS 26.5 — SKTestSession unusable in CI
On iOS 26.5 simulator runtime, running UI tests via xcodebuild test from the command line does not push the scheme's StoreKitConfigurationFileReference to the destination simulator's storekitd AppGroup Octane container. As a consequence, SKTestSession(configurationFileNamed:) either silently falls through to the production App Store (surfacing a Sign in to Apple Account SpringBoard alert during paywall tests), or throws SKInternalErrorDomain Code=3 Error saving configuration file if you call any SKTestSession instance method. The same project, same scheme, same .storekit file works correctly when launched via Xcode IDE (Cmd+R / Cmd+U) — which uses DVTDevice.handleStoreKitConfigurationSyncForBundleID:configurationFilePath: via an internal IDELaunchSession XPC path that the public xcodebuild CLI does not invoke. This regression makes StoreKit Test unusable in CI for any project using xcodebuild test or xcodebuild test-without-building against an iOS 26.5 simulator. Environment macOS: 26.x Xcode: 26.4.1 (25E253)
Replies
2
Boosts
0
Views
154
Activity
1w
Reply to Drag on a Canvas with XCUICoordinate.press(...)
Glad you got it working — and thanks for posting the resolution. The interaction between XCUICoordinate and SwiftUI's coordinate spaces in the presence of transforms is subtle enough that your write-up will likely help someone else who runs into it.
Replies
Boosts
Views
Activity
1w
SwiftUI Liquid Glass Menu briefly turns black after dismissing before returning to transparent glass
Hi, I’m seeing a visual issue with a SwiftUI Menu styled with Liquid Glass on iOS 26. I have a top bar control where a Menu is inside a GlassEffectContainer. The menu label uses .glassEffect(.regular.interactive()), glassEffectID, and glassEffectUnion. The control normally looks translucent, matching the background correctly. But when I open the menu and then dismiss it, the glass control briefly becomes solid black for a moment before returning to the expected transparent/glass appearance. This is visible especially on a colorful/blurred background: Before opening the menu: the control is transparent Liquid Glass. Open the SwiftUI Menu. Dismiss the menu. The menu label/control briefly renders as a black pill. After a short delay, it returns to the correct transparent glass style. Here is the simplified structure: @Namespace private var namespace GlassEffectContainer(spacing: 18) { VStack(spacing: 4) { Menu { Button { selectedMode = .automatic } label: { Label(Automatic, systemImage: wand.an
Replies
0
Boosts
0
Views
172
Activity
1w
Reply to AVAudioSession gets interrupted when closing a window
I have the same issue in visionOS 26, but in the context of the SwiftUI pushWindow API. Repro steps: App launches with window A visible. Window A users AVAudioPlayer to play continuous background audio. The app calls pushWindow, presenting window B. The audio stops. At this point AVAudioSession.interruptionNotification is received twice. A workaround is to resume the audio when AVAudioSession.interruptionNotification is received. This sounds glitchy.
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
1w
Reply to Inexplicable Metal crash ever since iOS 26.5 beta 4
Thanks for posting and for sharing the repo — being able to look at the actual code makes a real difference here. The phone-restart class of crash matters. App-level Metal exceptions normally crash the app, not the device. A full phone reboot from a compute shader means whatever's failing crossed out of user-space into the GPU driver or kernel. That can happen two ways: A driver-side bug provoked by some specific user-space pattern, which would be a Metal/driver issue Apple needs to address. Memory corruption in your app — for example, an over-write of an MTLBuffer's contents past its allocated size, a stale gpuResourceID for a resource that's been freed, a race between threads populating argument-table entries, or wrong format/stride assumptions — that lands the GPU on garbage data and the driver panics. Allocator layouts and hardening change between iOS versions, so a dormant memory issue under beta 3 can become a reliable kernel panic under beta 4. The worked, then stopped working timing fits this case too
Topic: Graphics & Games SubTopic: Metal Tags:
Replies
Boosts
Views
Activity
1w
Reply to SwiftUI template in Instruments 26.4.1 shows empty channels on iOS 26.4.2 device — even with a minimal TimelineView repro
Hi there, Thanks for reaching out. That is certainly unexpected - you are doing everything correctly. It seems that the presence of SwiftUI recording is making the entire file captured invalid for some reason. To investigate this issue further, could you please file a feedback with iOS sysdiagnose attached? Additionally, please go to Instruments Settings and click 'Attach supporting files', record again, attach .trace file to the feedback report. This should give us enough diagnostics to understand your issue further and fix it. Thanks, Kacper
Replies
Boosts
Views
Activity
1w
Reply to Textfield with both a formatter and axis
You should be able to use one of the init (e.g., axis) and then set up the format with modifiers. See if this can help: https://mehmetbaykar.com/posts/swiftui-textfield-axis-and-format/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1w
How to disable multiple windows feature of my App on iPadOS?
My app is a SwiftUI lifecycle app. I want to disable its multiple windows feature on iPadOS . I have tried to set the Enable Multiple Scenes option to false in Application Scene Manifest, but it doesn't work.
Replies
0
Boosts
0
Views
144
Activity
1w
SwiftUI Canvas ring animation briefly rotates backward after app returns from background
Hi, I have a SwiftUI work time screen with a rotating ring (60 tick marks, Canvas-based). While the app stays in foreground, rotation is fine. After the app is in background for a while and comes back to foreground, I consistently see one visual glitch: the ring makes one very short step in the opposite direction once then continues rotating clockwise normally So this is not a crash, only a visual reverse tick on resume. What I expect: no direction change after foreground resume continuous clockwise motion What I already tried: withAnimation(.linear(...).repeatForever(...)) + restart on scenePhase TimelineView (.animation and .periodic) with time-based angle angle with and without modulo wrapping wall-clock and monotonic time sources rotation via rotationEffect and also via Canvas geometry warmup delays after resume restoring original ring visuals (long/short tick marks) The effect is still reproducible. Question: What is the correct SwiftUI approach to implement a continuously rotating ring
Replies
0
Boosts
0
Views
171
Activity
1w