SwiftUI List performance

39,584 results found

Post not yet marked as solved
1 Replies
I’m still coming up to speed on QUIC myself, so I spent some time digging into this. AFAICT this is working as designed. On the client side, you can create a QUIC connection in one of two ways: As a connection, using NWConnection As a connection group, using NWConnectionGroup In both cases the object you create ‘owns’ stream ID 0. In the first case you can access it via the I/O methods on the connection. In the second case you can’t access it at all. If there’s a specific reason you need to use a connection group and perform I/O on stream ID 0, I recommend that you file an enhancement request [1] explaining the real world impact of this limitation. Please post your bug number, just for the record. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] Or is it a bug report? That’s a tricky one (-: However, it doesn’t matter, it’ll go to the right folks either way.
Post not yet marked as solved
1 Replies
106 Views
Hey folks, Having some trouble getting Animations to behave properly. I'll try to explain what I am doing, but maybe it is easier to run the project, which you can clone from github here. The key is in commenting out line 32/33 and uncommenting lines 34/35 in GaugeView.swift Otherwise: here is the high-level goal I'm aiming for: I'd like to see a horizontal gauge, akin to a tape measure (ignore the colors in this example image ), but (initially) centered on zero, and extending both to negative and positive measures. It will represent some value and that value can go up to a positive maximum number, and a minimum negative number. On overflow on either side, the tape measure should wrap-around. For this, I would like to create the illusion of an infinite tape measure, that keeps moving as the values change. There will be NO user interaction at all, the values are coming in from some device, and simply need to be displayed. Now, the basic logic seems to work: There is a tapemeasure view, which shows zero in the
Posted
by Joride.
Last updated
.
Post not yet marked as solved
3 Replies
85 Views
Using IOServiceMatching and IOServiceGetMatchingServices api's written in swift to extract the info of both internal and external USB devices connected. For the same code Intel based Mac OS devices gives all the info like product id , vendor id , Serial number and etc for both external and Internal USB devices( Apple and Non Apple devices connected either to Apple T2 bus or USB bus). For the same code M2 Mac Machine only gives the external device info which are connected to USB, doesn't give any info of Internal USB connected devices. Why is this difference ? Which api's need to be used to extract info of internal USB connected devices even in M2 based Mac machine. Thanks
Posted Last updated
.
Post not yet marked as solved
4 Replies
I wonder if this is an issue with the QT framework you are using on Sonoma? If you create a standard Mac app using native UI frameworks like AppKit or SwiftUI, does the Accessibility Inspector work? If so, it would seem that perhaps something regressed with QT on Sonoma. But if you are still running into issues, it would seem like an Accessibility Inspector issue, and I would encourage you to file a Feedback Assistant report so we can take a further look!
Post marked as solved
1 Replies
106 Views
Please run the following UIKit app. It uses a collection view with compositional layout (list layout) and a diffable data source. The collection view has one section with one row. The cell contains a text field that is pinned to its contentView. import UIKit class ViewController: UIViewController { var collectionView: UICollectionView! var dataSource: UICollectionViewDiffableDataSource! override func viewDidLoad() { super.viewDidLoad() configureHierarchy() configureDataSource() } func configureHierarchy() { collectionView = .init(frame: .zero, collectionViewLayout: createLayout()) view.addSubview(collectionView) collectionView.frame = view.bounds } func createLayout() -> UICollectionViewLayout { UICollectionViewCompositionalLayout { section, layoutEnvironment in let config = UICollectionLayoutListConfiguration(appearance: .insetGrouped) return NSCollectionLayoutSection.list(using: config, layoutEnvironment: layoutEnvironment) } } func configureDataSource() { let cellRegistration = UICollectionView
Posted
by Filippo02.
Last updated
.
Post marked as solved
1 Replies
109 Views
Everything works as expected until I add the paging behavior to the scrollView with a non-zero content margin. The paging behavior ends up not being centered on the cards. Here is a simple example: import SwiftUI struct CarouselView: View { var body: some View { ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 0) { ForEach(0 ..< 5, id: .self) { _ in RoundedRectangle(cornerRadius: 25) .fill(.ultraThinMaterial) .containerRelativeFrame(.horizontal) .scrollTransition(axis: .horizontal, transition: { content, phase in content .scaleEffect(x: phase.isIdentity ? 1 : 0.8, y: phase.isIdentity ? 1 : 0.8) }) } } .scrollTargetLayout() } .scrollTargetBehavior(.paging) .contentMargins(60) // NOTE: I want to see the sides of the next and previous card .background(Gradient(colors: [.purple, .red])) } } Thanks!
Posted
by zacswolf.
Last updated
.
Post marked as solved
1 Replies
111 Views
error: unable to read property list from file: /Users/jayengineer/Workspace/react_projects/Breached/ios/Breached/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 2.) (in target 'Breached' from project 'Breached') CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName Breached CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0.4/string> CFBundleSignature ???? CFBundleURLTypes CFBundleURLSchemes com.jay754.Breached CFBundleVersion 1 LSApplicationCategoryType LSRequiresIPhoneOS NSAppTransportSecurity NSAllowsArbitraryLoads NSAllowsLocalNetworking UILaunchStoryboardName SplashScreen UIRequiredDeviceCapabilities armv7 UIRequiresFullScreen UIStatusBarStyle UIStatusBarStyleDefault UISupportedInterfaceOrientations
Posted
by jay754.
Last updated
.
Post not yet marked as solved
4 Replies
128 Views
When I search for recipes, my app should come up, but it doesn't show in the list anywhere. I've tried a bunch of different keywords and even put 'recipes' in the title-still nothing. It's not even last in the list when I scroll through the 50+ recipe apps... I can type in the name of my app (morphood) and it finds it, but how is that useful? I am trying to get new people to find my app who are looking for AI, Recipes, Ingredients, Nutrition, Cooking, Diet, Food, Health, Keto, Gluten-Free, Vegan, Compare If you know the name of the app, then you already know about it.... Any help would be appreciated
Posted Last updated
.
Post not yet marked as solved
1 Replies
157 Views
In this code, I aim to enable users to select an image from their phone gallery and display it with less opacity on top of the z-index. The selected image should appear on top of the user's phone camera feed, allowing them to see the canvas on which they are drawing as well as the low-opacity image. The app's purpose is to enable users to trace an image on the canvas while simultaneously seeing the camera feed. CameraView.swift import SwiftUI import AVFoundation struct CameraView: View { let selectedImage: UIImage var body: some View { ZStack { CameraPreview() Image(uiImage: selectedImage) .resizable() .aspectRatio(contentMode: .fill) .opacity(0.5) // Adjust the opacity as needed .edgesIgnoringSafeArea(.all) } } } struct CameraPreview: UIViewRepresentable { func makeUIView(context: Context) -> UIView { let cameraPreview = CameraPreviewView() return cameraPreview } func updateUIView(_ uiView: UIView, context: Context) {} } class CameraPreviewView: UIView { private let captureSession = AVCaptureSess
Posted
by jhems.
Last updated
.
Post marked as Apple Recommended
573 Views
I am using #canImport(JournalingSuggestions), but something is going wrong and my app is attempting to import the framework on iPad, and crashing on launch. How can I ensure that it's properly filtered out from everything except iPhone? import SwiftUI #if canImport(JournalingSuggestions) import JournalingSuggestions #endif struct JournalingSuggestionsView: View { var body: some View { #if canImport(JournalingSuggestions) JournalingSuggestionsPicker { Text(Open Journaling Suggestions) } onCompletion: { suggestion in print(suggestion) } #else Text(Journaling suggestions not available on this platform.) #endif } } Error: dyld[8689]: Library not loaded: /System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions Referenced from: /private/var/containers/Bundle/Application/C6C11F57-AFAA-442A-B726-7AADDDB50D79/Catalog.app/Catalog Reason: tried: '/System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions' (no such file), '/private/preboot/Cryptexes/OS/System/Librar
Posted
by aenewton.
Last updated
.
Post not yet marked as solved
1 Replies
I solve this issue by changing Access setting: Go to Menu System Preferences -> Security & Privacy. 2.Choose the Privacy Tab. 3.Select Full Disk Access item in left list. 4.Select Xcode in right list. you can see https://github.com/flutter/flutter/issues/57552
Post not yet marked as solved
4 Replies
paying? I'm not paying for keywords. I just put that list in the section that says 'keywords separated by a comma...
Post not yet marked as solved
2 Replies
221 Views
I need to create a carousel component with the following requirements (sorted by relevance): Objectives Every image is 16:9 aspect ratio and resizes to fit the screen. Needs a zoom and pan functionality, possibly the same way as iOS Photos app. Needs to work both in landscape and portrait mode, with a smooth transition between orientations. When orientation changes, the image needs to be rotated to preserve the center of the image (like Photos app and hyperoslo/Lightbox) The component should only take the minimum necessary space. In most use cases, such component should have other subviews both above and below. Circularity. I would like the carousel to wrap around. What I tried: Using a TabView with .tabViewStyle(PageTabViewStyle()).indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always)) modifiers. This didn't work: rotating the interface caused the view to get stuck between pages (it looks like it's a well known [bug]).(https://stackoverflow.com/questions/72435939/swiftui-tabview-is-not-w
Posted Last updated
.
Post not yet marked as solved
2 Replies
153 Views
I have tried to insert 1L key-values into the user defaults. It is working fine until 50k key-values. After some time, am getting Not updating lastKnownShmemState in CFPrefsPlistSource<0x2825b0c60> (Domain: peformance_validator, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) also, key-values are not updating in the plist as well. peformance_validator is my user defaults group name. How can I solve this ?
Posted
by r@anjith.
Last updated
.
Post not yet marked as solved
2 Replies
UserDefaults is intended to store small preferences. I’m not sure why you’re trying to run performance analysis on it, but your test limits are far beyond the expected use case. If you need to store 50 thousand records, or even 1 thousand records, user defaults is not the API to use. There are plenty of other options, including the file system, Core Data, and Swift Data. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com