Explore the various UI frameworks available for building app interfaces. Discuss the use cases for different frameworks, share best practices, and get help with specific framework-related questions.

All subtopics
Posts under UI Frameworks topic

Post

Replies

Boosts

Views

Activity

iOS26: onDrag of SwiftUI won't be called in specific cases.
There is no issue with triggering onDrag when long-pressing for the first time. However, if the user releases their finger and the DropDelegate determines this is not a valid drop operation, it will not trigger a view update. In this case, when the user long-presses the same view again, the onDrag method will not be triggered even though the floating Preview view is already displayed under the finger. The problem will not recur if the DropDelegate updates the view (such as swapping the positions of views). The same code works without issues on iOS 18. The problem can be reproduced with simple code like the following: struct ContentView: View { var body: some View { Rectangle() .fill(.blue) .onDrag { print("OnDrag") return NSItemProvider() } } } The "OnDrag" log will only be output once.
0
0
19
3d
QLPreviewPanel takes forever to load content preview in macOS 26
After upgrading to macOS 26, I noticed that showing a Quicklook preview in my app is very slow. Showing small text files is fine, but some other files I've tried, such as a Numbers document, take about 30 seconds (during which the indeterminate loading indicator appears) before the preview is shown. When showing the preview of an app, such as Xcode, the panel opens immediately with a placeholder image for the Xcode icon, and the actual Xcode icon is shown only after about 25 seconds. During this time many logs appear: FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.2/ (/) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.23684/ (/Users) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248032/ (/Users/n{9}k) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248084/ (/Users/n{9}k/Downloads) Failed to add registration dmf.policy.monitor.app with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction.} Failed to register application policy monitor with identifier 69DDBDB4-0736-42FA-BA7A-C8D7EA049E29 for types {( applicationcategories, websites, categories, applications )} with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction.} FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.155797561/ (~/Downloads/X{3}e.app) It seems that Quicklook tries to access each parent directory of the previewed file, and each one fails after 5 seconds. Why is Quicklook all of a sudden so slow? It used to be almost instant in macOS 15. I created FB20268201. import Cocoa import Quartz @main class AppDelegate: NSObject, NSApplicationDelegate, QLPreviewPanelDataSource, QLPreviewPanelDelegate { var url: URL? func applicationDidFinishLaunching(_ notification: Notification) { let openPanel = NSOpenPanel() openPanel.runModal() url = openPanel.urls[0] QLPreviewPanel.shared()!.makeKeyAndOrderFront(nil) } override func acceptsPreviewPanelControl(_ panel: QLPreviewPanel!) -> Bool { return true } override func beginPreviewPanelControl(_ panel: QLPreviewPanel!) { panel.dataSource = self panel.delegate = self } override func endPreviewPanelControl(_ panel: QLPreviewPanel!) { panel.dataSource = nil panel.delegate = nil } func numberOfPreviewItems(in panel: QLPreviewPanel!) -> Int { return 1 } func previewPanel(_ panel: QLPreviewPanel!, previewItemAt index: Int) -> QLPreviewItem! { return url as? QLPreviewItem } }
1
1
87
3d
some unicode string crash in iOS 26 (Core Text)
‏‏‏آلَحـ🇾🇪‏ᬼ⃝⃡Wٌـّاج this string cause a crash on iOS 26 when sett label.text Crashed: com.apple.main-thread 0 CoreText 0xf720c std::__1::__hash_table<std::__1::__hash_value_type<long, CGPoint>, std::__1::__unordered_map_hasher<long, std::__1::__hash_value_type<long, CGPoint>, std::__1::hash, std::__1::equal_to, true>, std::__1::__unordered_map_equal<long, std::__1::__hash_value_type<long, CGPoint>, std::__1::equal_to, std::__1::hash, true>, std::__1::allocator<std::__1::__hash_value_type<long, CGPoint>>>::erase(std::__1::__hash_const_iterator<std::__1::__hash_node<std::__1::__hash_value_type<long, CGPoint>, void*>>) + 300 1 CoreText 0xf63d4 TGlyphComposer::ComposeGlyphs(long, TInlineVector<unsigned short, 30ul> const&, TInlineVector<long, 30ul> const&) + 2896 2 CoreText 0x8b018 TCombiningEngine::ResolveCombiningMarks(TCombiningEngine::CombiningFlag, bool, bool*) + 2232 3 CoreText 0x4edf0 TKerningEngine::PositionGlyphs(TRunGlue&, TCharStream const&, signed char) + 1108 4 CoreText 0x4eee8 TTypesetter::FinishLayout(std::__1::tuple<TLine const*, TCharStream const*, void const* ()(__CTRun const, __CFString const*, void*), void*, std::__1::shared_ptr, unsigned int, unsigned char, bool, long> const&, TRunGlue&, signed char, SyncState) + 64 5 CoreText 0x34608 TTypesetterAttrString::Initialize(__CFAttributedString const*, bool) + 3300 6 CoreText 0x34d88 TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*, __CFDictionary const*, bool) + 160 7 CoreText 0x34c38 CTLineCreateWithAttributedString + 84 8 UIFoundation 0x6204 __NSCoreTypesetterCreateBaseLineFromAttributedString + 704 9 UIFoundation 0xafd38 -[NSCoreTypesetter _stringDrawingCoreTextEngineWithOriginalString:rect:padding:graphicsContext:forceClipping:attributes:stringDrawingOptions:drawingContext:stringDrawingInterface:] + 2652 10 UIFoundation 0x26bc __NSStringDrawingEngine + 1592 11 UIFoundation 0xab308 -[NSString(NSExtendedStringDrawing) boundingRectWithSize:options:attributes:context:] + 164 12 UIKitCore 0x186a978 + 132 13 UIKitCore 0x48a7c + 668 14 UIKitCore 0x186b35c + 444 15 UIKitCore 0x186eb30 + 408 16 UIKitCore 0x486d4 + 136 17 UIKitCore 0x47c1c + 80 18 UIKitCore 0x1b68e4 + 80 19 UIKitCore 0x1867c08 + 760 20 UIKitCore 0x18678ec + 72 21 UIKitCore 0x186be30 + 104 ....... 28 UIKitCore 0xa894e0 + 52 29 UIKitCore 0x19047fc + 76 30 UIKitCore 0xa88b0c + 1196 31 UIKitCore 0xa91ce0 + 524 32 UIKitCore 0xa9222c + 280 33 UIKitCore 0xa90550 + 3036 34 UIKitCore 0x1e1604 + 280 35 UIKitCore 0x27078 + 912 36 UIKitCore 0x27b38 + 40 37 UIKitCore 0x190df68 + 2532 38 QuartzCore 0xac8bc + 116 39 QuartzCore 0x8f2fc + 600 40 QuartzCore 0xadf84 + 200 41 QuartzCore 0x6ef78 + 536 42 QuartzCore 0x9bab0 + 644 43 QuartzCore 0xa93c0 + 88 44 UIKitCore 0x780f0 + 52 45 UIKitCore 0x78024 + 352 46 UIKitCore 0x85ee8 + 128 47 UIKitCore 0x85378 + 60 48 UpdateCycle 0x15f8 UC::DriverCore::continueProcessing() + 84 49 CoreFoundation 0x6a230 + 28 50 CoreFoundation 0x6a1a4 + 172 51 CoreFoundation 0x47c6c + 232 52 CoreFoundation 0x1d8b0 + 820 53 CoreFoundation 0x1cc44 + 532 54 GraphicsServices 0x1498 GSEventRunModal + 120 55 UIKitCore 0xa9ddc + 792 56 UIKitCore 0x4eb0c UIApplicationMain + 336 57 UIKitCore 0x18a860 + 588 59 ??? 0x18c7cae28 (缺少)
0
0
75
3d
iOS 26 UITabBar (swift_getObjectType) crash
We’ve recently updated our app to adopt the native iOS 26 tab bar. Since then, we’ve started seeing crashes on iOS 26 devices with swift_getObjectType appearing in the stack. I’ve reviewed the logs in Organizer but couldn’t find anything conclusive. The issue seems isolated to iOS 26 and doesn’t reproduce on earlier versions. com.grofers.consumer_issue_2cc3a4a209ab2b47bfbdab919a320fa7_crash_session_68148be54ef5441fac56d3138d055bac_DNE_5_v2_stacktrace.txt
0
0
66
3d
iPadOS 26 - Status bar overlaps with navigation bar
Hello, I'm experiencing a navigation bar positioning issue with my UIKit iPad app on iPadOS 26 (23A340) using Xcode 26 (17A321). The navigation bar positions under the status bar initially, and after orientation changes to landscape, it positions incorrectly below its expected location. This occurs on both real device (iPad mini A17 Pro) and simulator. My app uses UIKit + Storyboard with a Root Navigation Controller. A stack overflow post has reproduce the bug event if it's not in the same configuration: https://stackoverflow.com/questions/79752945/xcode-26-beta-6-ipados-26-statusbar-overlaps-with-navigationbar-after-presen I have checked all safe areas and tried changing some constraints, but nothing works. Have you encountered this bug before, or do you need additional information to investigate this issue?
3
1
116
3d
Transparency Mode and Images in Widgets under iOS 26
Hi everyone, so I have a widget that is loading and showing images. When changing my icons and widget to transparent or tinted on iOS 26 they just turn white or the tint color. How can I mark images to preserve their appearance aka color? The Fotos widget has (long press and its configuration) and option to tint them or preserve the color. I just can't figure out how it's done and what API to use. Second, is there an API to learn which mode is currently being used to tweak other elements of the UI? Thanks for any advice.
2
0
90
3d
vision pro notifications too small for shareplay
A is there a way to get big huge notitifications for Shareplay invitations ? B can i have the notifications inside the app ? we have a corporate app to check archtecture projects we want to share these 3d spaces walking inside with near users in the same place to discuss about the project .. but it takes too long shareplay invitation is a small circle on top, if the others users just put the vision without configuring eyes and hands... it's gonna be impossible thanks for sharing and giving us support
2
0
96
3d
NSBrowser Column Resizing Causes NSWindowWillStartLiveResizeNotification to be posted even though the window isn't being resized.
I have an NSBrowser inside a window. When I start resizing a column I noticed a peculiar behavior: it causes NSWindowWillStartLiveResizeNotification to get posted for the NSWindow the browser is inside (and did end gets posted when column resizing finishes). The browser is not the NSWindow contentView but a descendant of the contentView. I have my reasons for caring (I'm currently listening for these window resize notifications) but my code naively assumes that NSWindowWillStartLiveResizeNotification - NSWindowDidEndLiveResizeNotification indicates a window resizing session, not a column resizing session for the NSBrowser. This is in contrast to NSOutlineView. When resizing columns in NSOutlineView the window resize notifications do not get posted. NSBrowser deliberately kicks it off: -[NSWindow _startLiveResize]; -[NSBrowser _resizeColumn:withEvent:] () So this seems quite intentional but is it necessary in modern macOS? Should I file a bug? I already did FB20298148
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
67
3d
UIButton does not receive any touches after I add clearGlassButtonConfiguration for iOS26
I have a customized navigationbar, the back button does not receive any touches after I add clearGlassButtonConfiguration for iOS26, also there is no touch effects for clearGlassButtonConfiguration when I remove this UIButtonConfiguration setting,everything workes. - (UIButton *)backButton { if (!_backButton) { _backButton = [UIButton buttonWithType:UIButtonTypeCustom]; _backButton.frame = CGRectMake(0, 0, 44, 44); UIImage * img = [[UIImage imageNamed:@"IVC_back"]imageWithColor:HEXCOLOR(0xFFFFFF)]; [_backButton setImage:img forState:UIControlStateNormal]; [_backButton addTarget:self action:@selector(backAction) forControlEvents:(UIControlEventTouchUpInside)]; if (@available(iOS 26.0, *)){ _backButton.configuration = UIButtonConfiguration.clearGlassButtonConfiguration; } } return _backButton; }
Topic: UI Frameworks SubTopic: UIKit
2
0
98
3d
SwiftUI 26: How to change new toggles background color?
The .tint modifier doesn't seem to change the background color on the redesigned macOS 26 toggles. For example, using: Toggle("", isOn: isOn) .toggleStyle(.switch) .tint(.cyan) .scaleEffect(0.8) .opacity(isEnabled ? 1.0 : 0.4) the toggles use the system accent color instead of cyan. Has SwiftUI introduced a new modifier for that? I couldn't find anything in the June 2025 changes.
0
0
122
3d
Possible false positives for UIScreen.main.isCaptured on iOS 26?
In our app we show a warning when UIScreen.main.isCaptured is true. After updating to iOS 26, some users are seeing this warning, even though they say they are not recording the screen. The issue persists after rebooting and reinstalling the app. I know this flag is expected to be true during screen recording or sharing. Are there any new scenarios in iOS 26 that could trigger isCaptured, or any known issues where it may be set unexpectedly or maybe accidentally by the user?
Topic: UI Frameworks SubTopic: UIKit
1
0
46
3d
Change to safe area logic on iOS 26
I have a few view controllers in a large UIKit application that previously started showing content right below the bottom of the top navigation toolbar. When testing the same code on iOS 26, these same views have their content extend under the navigation bar and toolbar. I was able to fix it with: if #available(iOS 26, *, *) { self.edgesForExtendedLayout = [.bottom] } when running on iOS 26. I also fixed one or two places where the main view was anchored to self.view.topAnchor instead of self.view.safeAreaLayoutGuide.topAnchor. Although this seems to work, I wonder if this was an intended change in iOS 26 or just a temporary bug in the beta that will be resolved. Were changes made to the safe area and edgesForExtendedLayout logic in iOS 26? If so, is there a place I can see what the specific changes were, so I know my code is handling it properly? Thanks!
Topic: UI Frameworks SubTopic: UIKit
5
4
579
3d
Need help with attribute inspector in Xcode 26
I am trying to learn Xcode and swift ui for a class project but the attribute inspector just does not show up, I can have the simulator open or closed I click on it nothing works. I feel so stupid. I suppose you don't need it but it helps a lot. anyone have any trouble shooting that could help?
Topic: UI Frameworks SubTopic: SwiftUI
2
1
72
3d
[iOS26][TableView] Abnormal problem when sliding tableview cell
I created a tableview with two cells and configured a left-swipe action for each cell. When I swipe left, the cell displays normally. When I swipe the cell back to its original position, the view displays normally. When I quickly swipe right after the cell has been reset, the view displays noticeably abnormally. import UIKit import Vision import CoreImage import CoreImage.CIFilterBuiltins class ViewController: UIViewController { var tasks = ["学习 Swift", "阅读文档", "编写代码", "测试应用", "提交审核"] private let tableView: UITableView = { let table = UITableView() table.register(UITableViewCell.self, forCellReuseIdentifier: "cell") return table }() override func viewDidLoad() { super.viewDidLoad() view.addSubview(tableView) tableView.frame = view.bounds tableView.dataSource = self tableView.delegate = self // 关键设置 tableView.estimatedRowHeight = 0 tableView.estimatedSectionHeaderHeight = 0 tableView.estimatedSectionFooterHeight = 0 tableView.rowHeight = 60 // 固定高度 } } // MARK: - UITableViewDataSource extension ViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return tasks.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) cell.textLabel?.text = tasks[indexPath.row] cell.textLabel?.numberOfLines = 0 // 允许多行文本 return cell } } // MARK: - UITableViewDelegate extension ViewController: UITableViewDelegate { func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { let deleteAction = UIContextualAction(style: .destructive, title: nil) { [weak self] (_, _, completionHandler) in guard let self = self else { return } } deleteAction.image = UIImage(systemName: "trash") deleteAction.backgroundColor = .systemRed let configuration = UISwipeActionsConfiguration(actions: [deleteAction]) configuration.performsFirstActionWithFullSwipe = false return configuration } // 可选:精确控制行高(二选一) func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 60 // 固定高度,或者根据内容计算 } }
Topic: UI Frameworks SubTopic: UIKit
0
0
40
3d
Document title/proxy shifts left when adding an empty SwiftUI/AppKit toolbar - how to keep it centered?
I’m building a document-based macOS app using SwiftUI with an AppKit NSDocument. By default, when the window has no toolbar, the document title and proxy icon (with the edited state dot and standard saving controls) appear nicely centered in the title bar. However, as soon as I attach a toolbar - even an empty one - the document proxy moves to the leading edge of the title bar. Is there a way to keep the document proxy/title centered in a document-based SwiftUI app while also using a toolbar? Or is the left-alignment now the only supported behavior when a toolbar is present? Thanks in advance for any guidance.
2
0
61
3d
iOS 26 NavigationStack Title Rendering Issue
Is anyone else experiencing NavigationStack title disappearing in iOS 26? Hey everyone, I just updated to iOS 26 and I'm running into a really frustrating issue with my app. Wondering if anyone else is seeing this or if I'm missing something obvious. What's happening: My navigation titles are completely blank when the app first loads, but then magically appear when I scroll down. It's super weird and makes my app look broken at first glance. My setup: I'm using NavigationStack with some pretty standard stuff: Navigation title with .navigationTitle() A toolbar with a settings button ScrollView content with a gradient background Here's basically what I have: NavigationStack { ScrollView { VStack(spacing: 24) { // My app content here - cards, etc. ForEach(myItems) { item in // Content cards } } .padding() } .background( LinearGradient( gradient: Gradient(colors: [ Color.surfacePrimary, Color.surfacePrimary.opacity(0.95), Color.surfaceSecondary.opacity(0.3) ]), startPoint: .top, endPoint: .bottom ) ) .navigationTitle("My Title") // ← This doesn't show up initially! .toolbar { ToolbarItem(placement: .navigationBarTrailing) { Button("Settings") { // Settings action } } } } The weird part: Works perfectly fine on my iOS 18.6.2 device Completely broken on iOS 26 - blank navigation area As soon as I scroll, the title appears and stays there Happens on both simulator and physical device What I've tried: Double-checking my code (it's identical to what worked before) Testing on multiple devices Different navigation title strings Removing and re-adding the toolbar Has anyone else run into this? I'm thinking it might be an iOS 26 bug with NavigationStack, but I wanted to check if others are seeing it before filing a radar. It's affecting my main landing screens (Tennis, NFL, and Prediction Markets tabs) and honestly looks pretty bad when users first open the app and see blank headers. Temporary fix I found: If anyone else hits this, I discovered that forcing inline titles works as a workaround: .navigationTitle("My Title") .navigationBarTitleDisplayMode(.inline) // This fixes it but kills large titles Obviously not ideal since we lose the nice large title behavior, but at least the titles show up. Questions: Is this happening to anyone else's iOS 26 apps? Any better workarounds that preserve large titles? Should I file this as a radar or is Apple already aware? Really hoping this gets fixed soon - having to choose between broken navigation or losing large titles is pretty frustrating. Thanks for any insights! Anyone else dealing with this NavigationStack nightmare in iOS 26? 😅
0
0
62
3d
iOS 26 (beta 7) setting .searchFocused programmatically does not work
Already filed a feedback in case this is a bug, but posting here in case I'm doing something wrong? I'd like the search field to automatically be displayed with the keyboard up when the view appears. This sample code works in iOS 18, but it does not work in iOS 26 beta 7 I also tried adding a delay to setting searchIsFocused = true but that did not help struct ContentView: View { var body: some View { NavigationStack { NavigationLink(destination: ListView()) { Label("Go to list", systemImage: "list.bullet") } } .ignoresSafeArea() } } struct ListView: View { @State private var searchText: String = "" @State private var searchIsPresented: Bool = false @FocusState private var searchIsFocused: Bool var body: some View { ScrollView { Text("Test") } .searchable(text: $searchText, isPresented: $searchIsPresented, placement: .automatic, prompt: "Search") .searchFocused($searchIsFocused) .onAppear { searchIsFocused = true } } }
4
0
108
3d
Weird glitches during restore from minimalization of any app
From what I’ve seen, this issue has been around since macOS 13 and can be reproduced reliably. It happens with some apps like Music, Notes, and Google Chrome. Here’s how to see it: 1.Make sure “Minimize windows into application” is enabled in System Settings, or just open a minimized app later directly from its application icon. 2.Open one of the apps mentioned above. 3.Minimize it. 4.Click the minimized app in the Dock to restore it. You’ll notice the GUI flashes for a moment and the minimize animation plays again. Some additional info here: https://forums.macrumors.com/threads/weird-glitches-during-restore-from-minimalization-of-any-app.2370260/ A video clipped from another GitHub issue: https://private-user-images.githubusercontent.com/13177224/445474477-36d8c784-9588-4186-8b6a-875c4077ce1c.mp4?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTgyMTQ0ODEsIm5iZiI6MTc1ODIxNDE4MSwicGF0aCI6Ii8xMzE3NzIyNC80NDU0NzQ0NzctMzZkOGM3ODQtOTU4OC00MTg2LThiNmEtODc1YzQwNzdjZTFjLm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA5MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwOTE4VDE2NDk0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwOWYwZWVmMDBjZWRiNzA2MDg1NDFiMTIxNmU3ZmFiZWIwOThjYzRmYmE1OWJiZWNlZjFlNjRlYjA4NTVkYjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xbAxdTgxadCVCZPsnZkhx9HnVbjP-D5w1GfPTBatIWQ
0
0
29
3d
Issue keeping scroll position in SwiftUI
Hey there, Link to the sample project: https://github.com/dev-loic/AppleSampleScrolling Context We are working on creating a feed of posts in SwiftUI. So far, we have successfully implemented a classic feed that opens from the top, with bottom pagination — a standard use case. Our goal, however, is to allow the feed to open from any post, not just the first one. For example, we would like to open the feed directly at the 3rd post and then trigger a network call to load elements both above and below it. Our main focus here is on preserving the scroll position while opening the screen and waiting for the network call to complete. To illustrate the issue, I created a sample project (attached) with two screens: MainView, which contains buttons to open the feed in different states. ScrollingView, which initially shows a single element, simulates a 3-second network call, and then populates with new data depending on which button was tapped. I am currently using Xcode 26 beta 6, but I can also reproduce this issue on Xcode 16.3. Tests on sample project I click on a button and just wait the 3 seconds for the call. In this scenario, I expect that the “focused item” stays at the exact same place on the screen. I also expect to see items below and above being added. Simulator iPhone 16 / iOS 18.4 with itemsHeight = 100 position = 0, 1, 2, 3 ⇒ works as expected position = 4, 5, 6, 7, 8, 9 ⇒ scroll is reset to the top and we loose the focused item Simulator iPhone 16 / iOS 18.4 with itemsHeight = 500 position = 0, 1, 2, 3, 4 ⇒ works as expected position = 5, 6, 7 ⇒ I have a glitch (the focused element moves on the screen) but the focused element is still visible position = 8, 9 ⇒ scroll is reset to the top and we loose the focused item Simulator iPhone 16 / iOS 26 with itemsHeight = 100 or 500 position = 0, 1, 2, 3, 4 ⇒ works as expected position = 5, 6, 7, 8, 9 ⇒ I have a glitch (the focused element moves on the screen) but the focused element is still visible Device iPhone 15 / iOS 26 with itemsHeight = 100 position = 0, 1, 2, 3, 4 ⇒ works as expected position = 5, 6, 7, 8, 9 ⇒ I have a glitch (the focused element moves on the screen) but the focused element is still visible Device iPhone 15 / iOS 26 with itemsHeight = 500 position = 0, 1, 2, 3 ⇒ works as expected position = 4, 5, 6, 7, 8, 9 ⇒ I have a glitch (the focused element moves on the screen) but the focused element is still visible Not any user interaction Moreover, in this scenario, the user does not interact with the screen during the simulated network call. Regardless of the situation, if the ScrollView is in motion, its position always resets to the top. This behavior prevents us from implementing automatic pagination when scrolling upward, which is ultimately our goal. My conclusion so far As far as I know it seems not possible to have both keeping scroll possible and upward automatic pagination using a SwiftUI LazyVStack inside a ScrollView. This appears to be standard behavior in messaging apps or other feed-based apps, and I’m wondering if I might be missing something. Thank you in advance for any guidance you can provide on this topic. Cheers
2
0
45
3d