Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Version
Unfortunately I doubt SwiftUI’s performance would be possible if it was a “normal” framework that is independent of the OS. Also it probably relies on the specific UIKit version that ships with the OS release.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’20
Reply to Build a List with keyboard selection (macOS App)
Could you explain more clearly your problems ? First is the textfield, you can only edit in a textfield when you click on the text, otherwise you selected the row. However my textfield is alway in full width... Is the problem that the text in the list is too large and you cannot click outside of text ? Or something else ? Note there is (yet another) bug in List: SwiftUI Textfields embedded in a List are not editable when target is macOS https://stackoverflow.com/questions/57576128/editable-textfield-in-swiftui-list In any case, posting your code would help understand the problem.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to I could really, really use some help with a concept that continues to hurt my head: Initializing.
The view that displays my list: import SwiftUI import CoreData struct DatabaseViewMain: View { @ObservedObject var refactoringAccount = RefactoringAccount.refactoringAccountSingleton var body: some View { VStack { //Creates the 'add account' button HStack { Spacer() NavigationLink { AddAccountContainer() } label: { SubHeaderViewIcon(subheaderIcon: plus.square, subheaderIconColor: Color(EditButtonBlue)) } .padding() } //Creates the List view List { ForEach(refactoringAccount.savedAccounts) {account in NavigationLink { AccountDetailMain(accountBackEnd: account) } label: { DatabaseViewCell( accountNameFromCell: account.accountCompanyName, accountLastVisitedFromCell: account.accountCity, accountTotalFromCell: account.accountLastDateVisited) //Text(account.accountCompanyName) } .foregroundColor(.gray) } .onDelete(perform: refactoringAccount.deleteAccount) .onAppear(perform: refactoringAccount.fetchAccount) } .listStyle(PlainListStyle()) } .navigationBarHidden(t
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to What is the best and simple way to link a SwiftUI button action to a View Model?
trying to implement it like this: import SwiftUI import Combine struct SwiftUIView: View { @State var showSheetView = false var body: some View { NavigationView { Text(Content) .navigationBarTitle(SwiftUI Tutorials) .navigationBarItems(trailing: Button(action: { self.showSheetView.toggle() }) { Image(systemName: bell.circle.fill) .font(Font.system(.title)) } ) }.sheet(isPresented: $showSheetView) { SheetView(showSheetView: self.$showSheetView) } } } struct SheetView: View { @Binding var showSheetView: Bool @ObservedObject private(set) var viewModel: ViewModel @State private var isRefreshing = false var body: some View { NavigationView { List(viewModel.videos.sorted { $0.id > $1.id}, id: .id) { video in NavigationLink( destination: VideoDetails(viewModel: VideoDetails.ViewModel(video: video))) { VideoRow(video: video) } } .onPullToRefresh(isRefreshing: $isRefreshing, perform: { self.viewModel.fetchVideos() }) .onReceive(viewModel.$videos, perform: { _ in self.isR
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’20
onOpenURL(perform:) vs application(_:open:options:)
Hi, community: I was trying to move from application(_:open:options:) (UIKit) to onOpenURL(perform:) (SwiftUI). Maybe there's something that I'm missing. In UIKit you can say to the system that you won't handle the URL then the app is not opened, but when I use onOpenURL(perform:) it is always opened. Is there any way to achieve the same behavior? Thanks in advance.
4
0
1.6k
Mar ’24
Reply to List in ForEach SwiftUI
You mean, if you replace ScrollView by List ? For me it works Or do you add List inside scrollView ? ttttScrollView { ttttttList { Effectively, you get nothing. But why would you do it ? I remember there was an issue with SwiftUI for such a pattern. List before scroll does work ttttList { ttttttScrollView { But would be the interest either ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’20
AFPS Performance Problems?
Filesystem performance on directories with non-trivial number of entires abysmal under Beta 3 and Beta 4. Finder rountinely locks up for many minutes at a time while listing directories, recursive deletion of files using command line takes minutes to hours with non-trivial directory nesting. Using a rotational hard disk, apfs.Problem is confined to a single profile.Booting to a separate volume on same disk with just a bare home directory has no performance problems.Problem home directory was populated using rsync from existing High Sierra machine (HFS+) — Migration Assistant was exhibiting same abysmal write rates (I'm guessing - estimated time to completion for 700GB was 100s of hours using 1000 BaseT direct connection).Is anyone else seeing this? Any suggestions on diagnosing problem? Submitting a radar is likely to elicit a reflexive request for a spindump — which is likely to take until release of beta 5 with current performance. I'd like more information before I file
1
0
1.1k
Jul ’18
network performance
I noticed that the behaviour of a copy or move window appears to calculate and perform differently from past OS X releases. There appears to be no issue but some users may believe there is an issue if they are not patient.Here is my setup.Newtork ISP Router - ethernet > Express - WIFI N -> Extreme (in bridge mode w/express)Here is what I did.1) Moved a 6GB file from the 10.11 desktop to a drive attached to the Extreme via a USB hub2) As the move began, only 1KB was tranferring per increment, it then began to increase and increase but disappointingly, the expected completion time was reportedly 15 hours.3) Patience persisted and 2GB into the move, there are 20 minutes remaining.I don't recall the calculated time, in this case 15 hours, displaying for as long as it did in past versions of OSX.In case you have a network performance issue or believe you do, please perform proper troubleshooting before suspecting the Finder or 10.11. Also consider wireless network interference wher
0
0
232
Jul ’15
Reply to UIHostingController adds unremovable NavigationBar
After long attempts, I have the same behavior in my UIKit project and SwiftUI Views with UIHostingController as with just UIKit. In my storyboard, the UIHostingController is embedded in the NavigationController and this in turn is connected to the UITab Bar Controller. The first thing to do is to uncheck Shows Navigation Bar in the Attributes Inspector of the NavigationController. In the SwiftUI View I have the list in the NavigationView with the modifier .navigationBarTitle (ViewTitle, displayMode: .large) and the next SwiftUI Views without NavigationView and the list with .navigationBarTitle (SecondViewTitle, displayMode: .inline) modifier. The best solution for me.
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’21
Reply to List jumps back to the top
If that may help, I found this, but did not test, using ScrollViewReader, but you've probably found as well: Get the scroll position: https://stackoverflow.com/questions/62588015/get-the-current-scroll-position-of-a-swiftui-scrollview Set the scroll position (in .onAppear ?): https://www.hackingwithswift.com/quick-start/swiftui/how-to-scroll-to-a-specific-row-in-a-list Or would it be enough to set the selection when it exists ? https://stackoverflow.com/questions/74365665/force-deselection-of-row-in-swiftui-list-view/74368833#74368833
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’25
SwiftUI External Events without SwiftUI Lifecycle
I am using the new pure SwiftUI App and Scene structs instead of an AppDelegate. Some of my views accept custom url schemes and user activities using onOpenURL(perform:). Everything works as expected. However, starting with Beta 6, Xcodes gives the following runtime warning: runtime: SwiftUI: Cannot use Scene methods for URL, NSUserActivity, and other External Events without using SwiftUI Lifecycle. Without SwiftUI Lifecycle, advertising and handling External Events wastes resources, and will have unpredictable results. What exactly am I doing wrong? What is *SwiftUI Lifecycle* referring to?
5
0
4.2k
Aug ’20
Two synchronized lists
Hello. Can anyone tell me how to implement horizontal and vertical list synchronization in swiftui? For example, a horizontal list is a group, a vertical list is a row of groups. Example: drive.google.com/file/d/13CVnUYaf4zyD295LnDUFJ7aNLVKDfYvp/view?usp=sharing
4
0
2.2k
Mar ’21