Search results for

SwiftUI List performance

50,609 results found

Post

Replies

Boosts

Views

Activity

Reply to SwiftUI slowly adoption
what I do is write the apps in swiftui then its pretty easy to bridge to UIKit for a particular view or part of it to get all of the functionality u have listed. I believe there is a WWDC session on this specifically. SwiftUI and UIKit generally plays together pretty well. Tbh its way easier and faster to do it that way than write everything in UIKit. some of what you have listed have been implemented in native swiftui already. eg pull down to refresh - have a look at the what's new in swiftui from the past few years wwdc's. I believe its called .refreshable MapKit has been recently brought into swiftui. not sure about the specific functionality you need but I recently converted my UIKit maps components into the native swiftui version. For the custom controls on a Video view, I overlayed some custom swiftui controls over the top of a bridged AVKit video player using a ZStack. it'll be another decade before everything is in swiftui
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Reply to New Design - impact to color use in existing app SwiftUI View
As part of the 6/12/25 SwiftUI Group lab, Curt and Taylor spoke to this specifically related to use of color in liquid glass SwiftUI views and that use of color should be limited. However, they didn’t speak to how to put color back into List View outline disclosure carets that aren’t there in new iOS/iPad OS 26. I would still like to know if I can add color back into the carets. Here was my group lab question that was discussed: “I’ve noticed with the new design language, SwiftUI views appear to not use color as much. Example, color modifiers for List View items like carets. Is this intended and can developers introduce color back into SwiftUI view elements, if desired, like in iOS/iPadOS 18?”
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’25
Reply to List updates very slowly and blocks UI
I heard about the performance problems and after some research a colleague and me got to a solution.: Currently. If you have a big list array which you try to modify, the list completely blocks the UI until it’s finished, which can take many seconds. To prevent this and work with thousands of entries without blocking everything, you just have to empty the list array and then fill it with the new modified array.So:Instead of a complicated workaround, just empty the List array and then set the new filters array. It may be necessary to introduce a delay so that emptying the listArray won't be omitted by the followed write.With a simple List like this and an listArray with your items:List(listArray){item in ... }Filter your array as needed and store the result somewhere. Then empty your original array! This way, SwiftUI won't do any comparisons and checks like it does when you just modifiy the array. After the array is empty fill it again with your ne
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’19
Reply to Pre-initialization of views?
Could you please provide some context on the steps you took to debugged the issue and code snippet that would help in reproducing the issue. Also, are you performing some operations in the onAppear closure? and are you using @State property wrapper to manage your view states. Keep in mind that the onAppear(perform:) method is completed before the first rendered frame appears and SwiftUI makes no guarantee as to the exact time the method is called.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24
Reply to SwiftUI ForEach in JSON
What is breweryData ? Is it the Array from lines 01 to 58 ?If so, where do you get the brewery of each item ?You could then filter the list depending on the brewery and use this filteredList in place of breweryDataSee example code here:h ttps://www.hackingwithswift.com/books/ios-swiftui/dynamically-filtering-a-swiftui-listIf not, what is it ?
Topic: Programming Languages SubTopic: Swift Tags:
May ’20
Performance problem with WKWebView in iOS9
Has anyone else noticed performance problems with the WKWebView in iOS9?Last year, when iOS8 was launched, we had to change our app's Visual Editor to use WKWebView instead of UIWebView because the performance when editing large files. That was a LOT of work, because the 2 controls work quite differently!Now, this huge performance hit appears to be happening again, but with WKWebView?Before we decide to completely give up on developing for iOS, can anyone else confirm that they are seeing this?
1
0
1.9k
Sep ’15
Reply to Import SQLite legacy data into CoreData
The test import worked as planned, except (as mentioned by others elsewhere) for having to convert the details NSOrderedSet of main to a Swift Array for use in SwiftUI's ForEach. The import only took a second or two on an oldish iPad Pro in debug mode with Xcode 13 on a MacBook Pro (early 2015) - so that's OK. It looks like Fetch performance is good: List displays the 1000 or so main records, with their details, within a second - and that's on app launch. The next step is to implement the CloudKit sync, and see what happens with syncing to other devices: i.e. syncing of the largish volumes of data. Any thoughts/suggestions?
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21
Shadow when using .onMove on a list
I'm using .onMove on a list for reordering. SwiftUI automatically applies shadow around the selected row which is great. My question is: Is there a way to make the shadow around the content in that row, in my case, a rounded rectangle, instead of around the whole list row container? import SwiftUI struct ContentView: View { var body: some View { List { ForEach(0...5, id: .self) { index in ZStack { RoundedRectangle(cornerRadius: 20).fill(.yellow) Text(Row: (index)).padding() }.padding() } .onMove {_,_ in } } .listStyle(.plain) } } #Preview { ContentView() }
0
0
331
Mar ’24