Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to SwiftUI .toolbar(placement: .keyboard) item not exposed to accessibility on iOS 26.1 (affects VoiceOver + XCUITest)
I've seen this behavior as well. Haven't been able to track down exactly why it's happening. I attempted to create a stripped down example, but couldn't recreate the same issue. A couple of things about the ToolbarItemGroup(placement: .keyboard) {} I'm investigating: My implementation is view a SwiftUI View that conforms to the ToolbarContent protocol. My implementation is part of a separate Swift Package utilized in my main project.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to Live Q&A Summary - SwiftUI foundations: Build great apps with SwiftUI
Can I make the view layout conditional based on device orientation? For example, responsively switching between HStack and VStack depending on if the device is in Portrait or Landscape mode? Yes you can. In most scenarios you should prefer to make your SwiftUI view layouts conditional based on device orientation. Use AnyLayout to dynamically switch between layout containers based on orientation without destroying the state of your subviews. AnyLayout lets you change layout type at runtime while preserving view identity and state. For example, you can switch between HStackLayout and VStackLayout based on the current size class or orientation, and SwiftUI maintains your view hierarchy seamlessly. For the symbolEffect(_:options:value:) method for SF symbols, the animation only runs when the value changes. Is there a way to implement this behavior idiomatically in SwiftUI? For animations that respond to value changes, use the animation(_:value:) modifier, which applies animations automa
Topic: UI Frameworks SubTopic: SwiftUI
1w
Live Q&A Summary - SwiftUI foundations: Build great apps with SwiftUI
Here’s a recap of the Live Q&A for SwiftUI foundations: Build great apps with SwiftUI. If you participated and asked questions, thank you for coming and participating! If you weren’t able to join us live we hope this recap is useful Where can I watch the VOD? Is the sample code “Wishlist” that was shown available for download? You can view the replay of the entire event here https://www.youtube.com/watch?v=Z3vloOtZLkQ The sample code for the Wishlist app will be made available in the coming weeks on the Apple Developer website, we'll send an update via email when it is available. What are the best practices when it comes to building complex navigations in SwiftUI? The developer website has documentation on navigation style best practices. Explore navigation basics like NavigationStack and TabView to get a ground-up understanding. For documentation on navigation APIs see Navigation. How can I integrate UIKit with my SwiftUI app? What about adding SwiftUI into my
Topic: UI Frameworks SubTopic: SwiftUI
1
0
38
1w
Reply to enforceRoutes impact on connection speed
[quote='815475021, krzsiwek, /thread/815475, /profile/krzsiwek'] Is this behavior known and expected? [/quote] Probably [1]. But it’s useful to have a specific benchmark to highlight this cost. I recommend that you file a bug describing the issue, how you’re testing the performance, and what results you got. Please post your bug number, just for the record. [quote='815475021, krzsiwek, /thread/815475, /profile/krzsiwek'] Is there anything we can do to mitigate [this] in our application? [/quote] Not that I can think of. There isn’t really much wiggle room here. Either the property is on or off and, assuming a specific flows hits your packet tunnel provider in both cases, it sees the same set of packets for that flow. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] Historically the networking stack didn’t have fancy features like enforceRoutes, and there’s been decades of optimisation for that simple case.
1w
iPadOS 26 – SwiftUI Menu in ToolbarItem shifts during pointer hover when view is presented as sheet
I am observing inconsistent pointer hover behavior for a SwiftUI Menu placed inside a ToolbarItem on iPadOS 26.2 (real device). Scenario: • Screen A is pushed inside a NavigationStack. • Screen B is presented as a sheet (with its own NavigationStack). • Both screens contain the same toolbar Menu item using an SF Symbol (arrow.up.arrow.down). Observed behavior: In the pushed view, hover is mostly stable. In the sheet-presented view, the SF Symbol visibly shifts/jumps when pointer hover activates. The hover highlight shape differs from the native navigation back button. Label-level hoverEffect modifiers do not stabilize the behavior. Minimal example: import SwiftUI struct ContentView: View { @State private var showSheet = false var body: some View { NavigationStack { VStack { Button(Open Sheet) { showSheet = true } } .navigationTitle(Home) .toolbar { ToolbarItem(placement: .topBarTrailing) { Menu { Button(Option A) { } Button(Option B) { } } label: { Image(systemName: arrow.up.arrow.down) } }
Topic: UI Frameworks SubTopic: SwiftUI
0
0
30
1w
Reply to How to Create a Full-Width Container (Edge-to-Edge Layout) Above a List View
The Apple sample code Landmarks project uses a LazyVStack inside a ScrollView. For a List, which you want, you will need to: Put the ContainerView in the List as the first row. Set the listRowBackground of the ContainerView to EmptyView(). Set the listStyle to plain, for listRowBackground to work. Add .background(alignment: .top) { with the background you want for the ContainerView. Use readFrame() to dynamically adjust the height of the background to match the maxY position of the ContainerView. import SwiftUI struct ListHeaderScene: View { @State var headerRect: CGRect? var headerHeight: CGFloat { headerRect?.maxY ?? 0 } var body: some View { List { ContainerView() .readFrame { headerRect = $0 } .listRowSeparator(.hidden) .listRowBackground(EmptyView()) Section(Section Title) { Text(Row 1) Text(Row 2) } } .listStyle(.plain) .background(alignment: .top) { // You can swap this for an image or whatever. Color.purple .frame(height: headerHeight) .ignoresSafeArea() } } } struc
Topic: UI Frameworks SubTopic: SwiftUI
1w
Frequent System Reboots (bug_type 210) on MacBook Pro with M4 Pro during Emulation Development
Environment: Device: MacBook Pro (Mac16,7) Chip: M4 Pro (SoC ID 6040, Revision 11) OS: macOS 15.2 (24C101) Kernel: Darwin Kernel Version 24.2.0; root:xnu-11215.61.5~2/RELEASE_ARM64_T6041 Summary: I am developing a Windows emulator on the MacBook Pro M4 Pro platform. During testing with certain applications, the system frequently triggers an instantaneous reboot. This issue appears to be highly specific to the M4 Pro hardware and current OS version. Observation & Diagnostic Challenges: Upon reboot, the system generates a bug_type 210 (SoC Watchdog Reset) report. The panic string indicates: Unexpected SoC (system) watchdog reset occurred after panic diagnostics were completed. The primary difficulty in debugging is that the hardware reset happens so rapidly that the kernel fails to capture a stackshot or any detailed panic trace. We have practically no actionable information from the standard diagnostic reports. However, we did find the following recurring entries in the system log prior to the resets: Igno
0
0
59
1w
.edgesIgnoringSafeArea(.vertical) combined with .tabViewStyle(.page(indexDisplayMode: .never)) causes "Out of Bounds" layout in Xcode 26 / iOS 26 SDK
I am reporting a regression/behavioral change in the SwiftUI layout engine when building with Xcode 26 (iOS 26 SDK). In previous versions (Xcode 15/16 and iOS 17/18 SDKs), a TabView using .tabViewStyle(.page(indexDisplayMode: .never)) correctly respected the coordinate space when combined with .edgesIgnoringSafeArea(.vertical). However, when compiling with the iOS 26 SDK, the internal views of the TabView render out of bounds, pushing content vertically beyond the intended safe area boundaries and causing UI overlapping/clipping - an abnormal behavior. TabView(selection: $selectedIndex) { ForEach(0..
0
0
37
1w
Reply to coreaudio-api mailing list search broken
To follow up on this, the search functionality of the archive is still broken. Additionally, the whole lists.apple.com server was down a few days ago. I still haven't received any reply from Apple. In case it helps others, I used the Wayback Machine to create an archive of the old coreaudio-api mailing list. It's available here: https://github.com/iccir/coreaudio-api-archive
1w
TabView inside NavigationStack is abnormal when using Xcode 26
TabView inside NavigationStack is abnormal when using Xcode 26. The y deviation is about 14. But it is right when using Xcode 16.4. It is also right without NavigationStack. import SwiftUI struct ContentView: View { private enum Tab: Hashable, CaseIterable { case a case b } @State private var currentTab: Tab = .a @State private var path: NavigationPath = NavigationPath() var body: some View { NavigationStack(path: $path) { TabView(selection: $currentTab) { ForEach(Tab.allCases, id: .self) { tab in switch tab { case .a: Color.blue // .offset(y: -14) case .b: Color.yellow } } } .tabViewStyle(.page(indexDisplayMode: .never)) .ignoresSafeArea(.all) } } }
Topic: UI Frameworks SubTopic: SwiftUI
0
0
46
1w
Q&A Summary for Code-along: Experiment with coding intelligence in Xcode 26
We received many great questions from the community during Code-along: Experiment with coding intelligence in Xcode 26. Here are the highlights from the questions submitted by the audience during the event. What models does coding intelligence features support In Xcode? Xcode integrates directly with ChatGPT and Claude user accounts. You can also configure Xcode to integrate any model provider that supports the Chat Completions API, such as models that you access with an API key. You can also download and run a local model on a Mac with Apple silicon. Setting up coding intelligence provides all of the information you need to get started with Xcode’s direct integration with ChatGPT and Claude, as well as how to set up Xcode to access other providers. Does Coding Intelligence have access to Apple API and developer documentation? How does it stay up to date with the latest SwiftUI API? Coding agents are great because they talk to a model, generate code and fix errors, but they also have access to tools,
0
0
437
1w
Which characters in filenames cause iCloud document sync issues?
Apple's iCloud File Management documentation says to avoid special punctuation or other special characters in filenames, but doesn't specify which characters. I need a definitive list to implement filename sanitization in my shipping app. Confirmed issues Our iOS app (CyberTuner, App Store, 15 years shipping on App Store) manages .rcta files in the iCloud ubiquity container via NSFileManager APIs. We've confirmed two characters causing sync failures: Ampersand (&): A file named Yamaha CP70 & CP80.rcta caused repeated couldn't be backed up dialogs. ~12 users reported this independently. Replacing & resolved it immediately. No other files in the same directory were affected. Percent (%): A file with % in the filename was duplicated by iCloud sync (e.g., filename% 1.rcta, filename% 2.rcta), and the original was lost. Currently reproducing across multiple devices. Both characters have special meaning in URL encoding (% is the escape character, & is the query parameter separator), which su
0
0
46
1w
Reply to Sticky Horizontal AnchorEntity
Hello @mlbonniec , thank you for your question! I believe what you are looking for is raycast(from:to:query:mask:relativeTo:). You can perform a raycast on the Scene that an Entity belongs to. If you configure an entity with ManipulationComponent, you can subscribe to the event ManipulationEvents.WillRelease to execute code when a person releases an object. Then, you can perform a raycast on the scene downward from the entity's position and place the entity on the closest surface. Here's a quick implementation I threw together demonstrating how to position an Entity on raycast hit: // This code runs when a person releases an object. func handleManipulationWillRelease(event: ManipulationEvents.WillRelease) { // Start the raycast from the position of the entity when it is released. let raycastStart = event.entity.position // End the raycast one meter below the starting point (surfaces further away than 1m will be ignored). let raycastEnd = raycastStart + [0, -1, 0] // Perform the rayc
Topic: Spatial Computing SubTopic: General Tags:
1w
Reply to Can TextField handle undo?
I investigated further and found your answer! UndoManager is the API in the Foundation framework for undo/redo and SwiftUI has an environment value for that undoManager. This example disables undo on TextField on Mac struct ContentView: View { @Environment(.undoManager) var undoManager: UndoManager? var body: some View { VStack { TextField(Test, text: $text) } .task { undoManager?.disableUndoRegistration() } } } Let me know if this answers your question  Travis Trotto - DTS Engineer
Topic: UI Frameworks SubTopic: SwiftUI
1w
Reply to Full Body Tracking
Hey @Stefko, There's no supported way to perform feet tracking with the APIs currently available. If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. Please include as much information as your use case as you can to help us understand your needs. Once you file the request, please post the FB number here. If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why? Thanks, Michael
Topic: Spatial Computing SubTopic: ARKit Tags:
1w