Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to UIScrollView does not give touches to subview if drag starts quickly
My problem was caused by something dumb that I left out of my question, because I was trying to simplify it to post here. My UIScrollView was actually inside a SwiftUI view hierarchy, using UIViewRepresentable. Higher in that view hierarchy, there was a SwiftUI List, which also has scrolling. I had forgotten about that List because I was using it for it's layout appearance, grouping items into sections, but not for its scrolling. Once I got rid of that List, everything worked as expected.
Topic: UI Frameworks SubTopic: UIKit Tags:
Feb ’22
Performance issue
What I'm trying to do. I am trying to upload the macOS app to App Store. Issue. I got a reject due to performance issue. This is the message I received. Guideline 2.1 - Performance We discovered one or more bugs in your app when reviewed on Mac running macOS 10.15.6. Specifically, the app does not appear to be listed in the Accessibility page. They also sent me a screenshot for the issue. From what I understand, it looks like they want the app to be listed in System Preferences > Security & Privacy > Privacy > Accessibility so they can just simply click the checkbox to enable accessibility for the app. What I did. (1) Find related documentation on Apple developer site. I was not able to find any related sources to solve how to add the app in the list. There were documents for camera / mic access but not for accessibility. (2) Added some code to show an alert to help user how to enable accessibility for the app. Function that check if keyboard access is
1
0
383
Aug ’20
Reply to SwiftUI Architecture
[quote='772333021, LilWolf89, /thread/772333, /profile/LilWolf89'] without so many files. Performance is very poor. [/quote] It would be helpful for you to quantify what your performance issues are. Number of source code files in itself is unlikely to be the source of a performance problem. Have you done any investigation into the performance of your app to understand what's happening so far? There's a SwiftUI Instrument that would be a good starting point for you to look at, using the Instruments app. —Ed Ford,  DTS Engineer
Topic: Community SubTopic: Apple Developers Tags:
Jan ’25
SwiftUI OpenURLOptions
With SwiftUI's onOpenURL(perform:) view modifier (https://developer.apple.com/documentation/swiftui/outlinesubgroupchildren/onopenurl(perform:)), is there any mechanism for accessing the options dictionary? In UIKit, the UIApplicationDelegate it would be passed as a parameter to application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]).
0
0
550
Aug ’21
Swift UI MapKit performance
iOS 17 SwiftUI and Mapkit performance I am trying to stop redraws/renders, I have quite a large polyline rendering to my map and its completely static it doesn't change I also have quite a few Annotations but want to draw only the annotations that are in view so I am setting up state with the current region with onMapCameraChange so I can then work out which annotations to show. The problem is that as soon as my region state updates it is unnecessarily rerenders/redraws my polyline. Is there anyway to stop this in SwiftUI Mapit?
0
0
536
Sep ’23
SPM Performance
I've been toying around with the new Swift Package Manager a bit and found that I'm unable to garner the performance that I would expect and trying to identify if I’ve made an error in my understanding or design.Initially, I was working on a rudimentary flood fill algorithm and found that I could break it apart into multiple Swift modules and thought this would be a grand time to try out the new SPM. :-)I created a `Stack`, `FloodFill`, and `FloodFillApp` module. The FloodFill module depends on the Stack module, and the FloodFillApp application then calls upon the FloodFill module to perform the algorithm. Very linear, quite simple. Prior to breaking it into separate modules the algorithm was taking around 0.04s to complete. Upon breaking it apart into separate modules and then compiling the FloodFillApp using `swift build -c release` I found that suddenly the algorithm was completing in around 16s! If left in debug mode, it takes around 120s to finish.The only thing I can come up with is th
1
0
1.2k
Sep ’16
Xcode 12 & iOS 14 betas - SwiftUI Lists do not render content when presented in a Sheet/Modal view.
Hi! I am testing my app on the new Xcode 12 beta and iOS 14 beta 1. My app contains a section where a SwiftUI List is presented modally with a simple .sheet declaration: .sheet(isPresented: $showingSheet, content: { Within this presented list, tapping an item in the list will present further content in a new modally presented .sheet on top of the first one. These subsequent modal sheets also contain SwiftUI List objects with further content. My issue in these new betas is that any .sheet modals presented subsequently to the first .sheet presented will not render any content in their Lists. My lists contain buttons that toggle the Boolean that presents the .sheet content. Example: List { ForEach(selectableLeagues, id: .self) { league in Button(action: { self.selectedDivision.append(contentsOf: league) self.showSheet.toggle() Sometimes, dismissing and reopening the subsequent modals will make the List content pop in, but t
12
0
2.0k
Jun ’20
Using .insetGrouped listStyle for List in SwiftUI on iOS14.4 caused a data problem
The code can be downloaded in a tutorial from Apple, the link is here: https://developer.apple.com/tutorials/app-dev-training/persisting-data Problem code: struct ScrumsView: View { @Binding var scrums: [DailyScrum] @Environment(.scenePhase) private var scenePhase @State private var isPresented = false @State private var newScrumData = DailyScrum.Data() let saveAction: () -> Void var body: some View { List { ForEach(scrums) { scrum in NavigationLink(destination: DetailView(scrum: binding(for: scrum))) { CardView(scrum: scrum) } .listRowBackground(scrum.color) } } // Problem here .listStyle(.insetGrouped) .navigationTitle(Daily Scrums) ... On iOS 14.4, I tried to set listStyle to any other style except .sidebar or .automatic, when I go to MeetingView and back to DetailView, the History section hasn't been updated. But if I use these code on iOS 15, there is no problem. I found that if I use these style, when I pop back to DetailView, the onDisappear closure in MeetingView would be executed, but the
0
0
555
Jul ’21
SwiftUI preview : PropertyListError: Property list missing value for required key "binaryType"
Hello, SwiftUI previews are not working in my project : when I try to display the preview in Xcode, I got this error : And if I click on the help icon, here is the complete error message : RemoteHumanReadableError: Invalid preview service message on ServiceHub channel ================================== | RemoteHumanReadableError | | PropertyListError: Property list missing value for required key ”binaryType” | Property list: [agentRole: previews, environment: { | DYLD_FRAMEWORK_PATH = /Users/alexandrecools/Library/Developer/Xcode/DerivedData/MyProject-gqsbendjcwgnvygdhqcoqqznoijh/Build/Intermediates.noindex/Previews/PreviewTesting/Products/Debug-iphonesimulator; | DYLD_LIBRARY_PATH = /Users/alexandrecools/Library/Developer/Xcode/DerivedData/MyProject-gqsbendjcwgnvygdhqcoqqznoijh/Build/Intermediates.noindex/Previews/PreviewTesting/Products/Debug-iphonesimulator; | OS_ACTIVITY_DT_MODE = YES; | PACKAGE_RESOURCE_BUNDLE_URL = /Users/alexandrecools/Library/Developer/Xcode/DerivedData/MyPr
1
0
960
Nov ’23