Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

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
Smooth appearance switching
Hello every developers. I need your help. Do you know how to attach animation to appearance, like a smooth transition from dark to light and vise versa. My code here: @main struct The_Library_of_BabelonApp: App { @AppStorage(selectedAppearance) private var selectedAppearance = 0 @StateObject private var router = AppRouter() var scheme: ColorScheme? { if selectedAppearance == 1 { return .light } if selectedAppearance == 2 { return .dark } return nil } var body: some Scene { WindowGroup { RootView() .preferredColorScheme(scheme) .environmentObject(router) // this is doesn't work correctly .animation(.smooth(duration: 2), value: selectedAppearance) } } } And my appearance switching looks: struct SettingsView: View { @AppStorage(selectedAppearance) private var selectedAppearance = 0 var body: some View { List { Section(header: Text(Appearance)) { HStack(spacing: 20) { ThemePreview(title: Light, imageName: lightTheme, tag: 1, selection: $selectedAppearance) ThemePreview(title: Dark, imageName: darkTheme,
1
0
39
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
Reply to Apple developer account
just have a go and look through these forums... 75% of topics over here are regarding this issue, some people are on months long waiting list without any reply for support tickets. Me personally, I'm only a week deep in this 48hrs max enrollment target / 2 bussines days max to reply to a support ticket, but reading these forums I already braced myself for at least another month or so... it's a joke of a 4 trilion dollar company.
1w
Reply to Can TextField handle undo?
Sorry for not replying earlier. No, I'm afraid that info isn't what I'm looking for. The thing that I'd like to understand really is, specifically: how to use the built-in undo support of SwiftUI TextField views, if any. Hopefully you're able to get details on this somehow!
Topic: UI Frameworks SubTopic: SwiftUI
1w
Reply to Swipe to go back still broken with Zoom navigation transition.
Also confirmed this is still broken in iOS 26.3 (23D127). My feedback is FB21078443 filed Nov 2025. If anyone can’t repro it, here’s a minimal example. Tap a color, then swipe back from the left edge—the source view will disappear after the transition. Easier to repro on physical device, but also possible in sim with a solid swipe. import SwiftUI struct ContentView: View { @Namespace private var namespace private let colors: [Color] = [.red, .blue] var body: some View { NavigationStack { VStack(spacing: 16) { ForEach(colors.indices, id: .self) { index in NavigationLink(value: index) { RoundedRectangle(cornerRadius: 16) .fill(colors[index]) .frame(maxWidth: .infinity, minHeight: 200, maxHeight: 200) .matchedTransitionSource(id: index, in: namespace) } .buttonStyle(.plain) } } .padding(20) .navigationTitle(Zoom Transition Issue) .navigationSubtitle(Tap card, then swipe back from left edge) .navigationDestination(for: Int.self) { index in Rectangle() .fill(colors[index]) .ignoresSafeArea() .navigationTr
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
NSStagedMigrationManager shortcomings
It seems to me that NSStagedMigrationManager has algorithmic issues. It doesn't perform staged migration, if all its stages are NSLightweightMigrationStage. You can try it yourself. There is a test project with three model versions V1, V2, V3, V4. Migrating V1->V2 is compatible with lightweight migration, V2->V3, V3->V4 is also compatible, but V1->V3 is not. I have following output: Migrating V1->V2, error: nil Migrating V2->V3, error: nil Migrating V3->V4, error: nil Migrating V1->V3, no manager, error: Optional(Persistent store migration failed, missing mapping model.) Migrating V1->V3, lightweight[1, 2, 3], error: Optional(Persistent store migration failed, missing mapping model.) Migrating V1->V3, lightweight[1]->lightweight[2]->lightweight[3], error: Optional(Persistent store migration failed, missing mapping model.) Migrating V1->V3, custom[1->2]->lightweight[3], error: nil Migrating V1->V3, lightweight[1]->custom[2->3], error: nil Migrating
5
0
267
1w
Reply to Archiving Catalyst project that embeds macOS tool
So splitting targets into different projects is a way to go, but do not make cross-project references and add target dependency. The idea is to build the subproject fully separately. Claude helped with implementation, so I asked it to write the rest of the post. The Solution Two scripts, triggered at different build stages: 1. Scheme Pre-Action — BuildPkgTestCMD.sh Builds the CLI project via a separate xcodebuild invocation before the main build starts. 2. Run Script Build Phase — CopyPkgTestCMD.sh Copies the built binary into the app bundle after the Resources phase. Both scripts check EFFECTIVE_PLATFORM_NAME and skip on non-Catalyst builds (e.g. iOS). Gotchas We Hit Build settings leaking into the nested xcodebuild call. Scheme pre-actions inherit all build settings from the parent target as environment variables. This means the nested xcodebuild silently picks up Catalyst platform, signing, and arch settings. Fix: wrap the call with env -i, passing through only selected variables: env -i PATH=$PATH HOME=
1w
SwiftUI mysterious behavior
Hello dear developers! Recently, I stumbled upon some really strange behavior of SwiftUI and I’m very curious why it works this way struct ContentView: View { @State private var title: String? @State private var isSheetPresented: Bool = false var body: some View { Button(Hello, world!) { title = Sheet title isSheetPresented = true } .sheet(isPresented: $isSheetPresented, content: { if let title { Text(title) } else { EmptyView() } }) } } Why in this case when we tap the button and sheet comes in we go to the branch else even though we set title before isSheetPresented but it still somehow nil But what really drive me crazy is that if we change a little bit code to this: I just added another @State property 'number' and use it as the Button's title. In this scenario it works 😃 and Text in the sheet view appearing struct ContentView: View { @State private var title: String? @State private var number = 0 @State private var isSheetPresented = false var body: some View { Button((number)) { title = Sheet
2
0
124
1w
Reply to System Panic with IOUserSCSIParallelInterfaceController during Dispatch Queue Configuration
Hi Kevin, Thank you for your feedback and the feedback from the engineering team. We have integrated all suggestions from your forum posts (ID: 875288022, 875587022) and the Bug Report, and have conducted a full round of testing. Below is our current status. We now perform a memset on SCSIUserParallelResponse in the ISR and correctly populate the version, fControllerTaskIdentifier, and fBytesTransferred fields. The ISR now differentiates between Bundled/Legacy modes, calling BundledParallelTaskCompletion (without release()) and ParallelTaskCompletion (with release()) accordingly. The aforementioned fixes have resolved all 0x92000006 Panics and DEXT Corpse crashes. Unplugging the hardware or deactivating the DEXT while the driver is in a hung state no longer triggers a panic. We are in a logical deadlock. The kernel dispatches a probe command before UserCreateTargetForID returns, and both of our methods for handling this command result in a permanent hang of the registration process: Scenario A (Repor
Topic: App & System Services SubTopic: Drivers Tags:
1w
Swiftui Map Leagal Text is transformed when rotationEffect is applied to Map
I have a problem when applying rotationEffect to a map in in SwiftUI. The legal text in the map is transformed as shown in this image: The following code is part of a much larger and complex view; it is a minimal example to reproduce the error: import SwiftUI import MapKit struct ContentView: View { @State private var offset = CGSize.zero var body: some View { ZStack { let drag = DragGesture() .onChanged { g in offset.width = g.translation.width offset.height = g.translation.height } Map(interactionModes: [.zoom]) .frame(width: 320, height: 220) .rotationEffect(.degrees(Double(offset.width / 12))) .highPriorityGesture(drag) } } } I hope you can help me with this problem.
1
0
39
1w
iOS App never gets Bluetooth connection
I am developing an iOS App for a Bluetooth peripheral using SwiftUI with Swift 5 or 6. I have a few past attempts that got so far (connected to a peripheral), and some downloaded examples that connect to peripherals. Lately (last month or so), my current attempt never gets BleManager to start, and every attempt ends at my View that says 'please enable Bluetooth'. The Xcode console is totally blank with no print outputs. Coding Assistant suggested the init() in my @main structure could contain print(App initializing), but even that never prints. Coding Assistant suggests: • Open your project's Info.plist in Xcode. • Make sure UIApplicationSceneManifest is present and configured for SwiftUI, not referencing any storyboard. • Ensure UIMainStoryboardFile is not present (or blank). but there is no info.plist because it is no longer required. Downloaded sample code runs and connects to peripherals, so Bluetooth is working on my iPhone and the Bluetooth device is accessible. My older attempts used
2
0
82
1w