Search results for

SwiftUI List performance

50,605 results found

Post

Replies

Boosts

Views

Activity

Reply to Layout issue using .strokeBorder modifier
Thanks for the post, hard to see your code, will be better if you post it as code to copy and paste, did you defined the color of the strokeBoarder like? .overlay { Circle() .strokeBorder(.black, lineWidth: 4) } In my opinion and observations, this may happens when anti-aliasing is applied to the view’s edges which results in partially transparent pixels to smooth out the transition between the view and its background? To remedy this issue we can set the rasterizationScale modifier on the view that is getting the strokeBorder applied to match the screen scale and force Sharp edges. Let me know. Also looking for other SwiftUI developers opinion. Thanks, Albert Pascual
  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2w
Reply to Animation does not work with List, while works with ScrollView + ForEach
Some issue here. I have a MVP that outlines to issue easily: import SwiftUI struct ContentView: View { var body: some View { List { Element() Element() Element() } } } struct Element: View { @State var isOn: Bool = false var body: some View { VStack { HStack { Text(Hello, World!) Button(Toggle) { isOn.toggle() } } if isOn { Text(It's on!) .transition(.opacity) } } .animation(.default, value: isOn) } } #Preview { ContentView() .frame(width: 400) } When using LazyVStack instead of List, the animation works flawlessly.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2w
Animation does not work with List, while works with ScrollView + ForEach
Why there is a working animation with ScrollView + ForEach of items removal, but there is none with List? ScrollView + ForEach: struct ContentView: View { @State var items: [String] = Array(1...5).map(.description) var body: some View { ScrollView(.vertical) { ForEach(items, id: .self) { item in Text(String(item)) .frame(maxWidth: .infinity, minHeight: 50) .background(.gray) .onTapGesture { withAnimation(.linear(duration: 0.1)) { items = items.filter { $0 != item } } } } } } } List: struct ContentView: View { @State var items: [String] = Array(1...5).map(.description) var body: some View { List(items, id: .self) { item in Text(String(item)) .frame(maxWidth: .infinity, minHeight: 50) .background(.gray) .onTapGesture { withAnimation(.linear(duration: 0.1)) { items = items.filter { $0 != item } } } } } }```
6
0
202
2w
Reply to انشاء تطبيق جديد
Thanks for the post and happy you want to create a game. But your post does not provide specific questions we can answer. About the development environment you asked in your post if translate worked well: Development Environment: Xcode: This is Apple's integrated development environment (IDE). You'll need it to write and build your iOS or macOS app. Download it from the Mac App Store. Swift (Programming Language): Swift is Apple's preferred language for iOS/macOS development. It's modern, safe, and relatively easy to learn. UIKit or SwiftUI (User Interface Framework): UIKit: The traditional framework. Mature and highly documented. Might be more suitable if your team is already familiar with it. SwiftUI: Apple's newer, declarative UI framework. Easier to write cleaner and more maintainable code, especially for simple layouts. Consider this if you're starting fresh. We will focus on SwiftUI for this guide. Here are a few suggestions that might help it attract more attention: Provide m
Topic: Graphics & Games SubTopic: General Tags:
2w
Unable to find intelgpu_kbl_gt2r0 slice or a compatible one in binary archive
Unable to find intelgpu_kbl_gt2r0 slice or a compatible one in binary archive 'file:///System/Library/PrivateFrameworks/IconRendering.framework/Resources/binary.metallib' available slices: applegpu_g13g, applegpu_g13s, applegpu_g13d, applegpu_g14g, applegpu_g14s, applegpu_g14d, applegpu_g15g, applegpu_g15s, applegpu_g15d, applegpu_g16g, applegpu_g16s, applegpu_g17g, applegpu_g15g, applegpu_g15s, applegpu_g15d, applegpu_g16s Is it related to performance of applications in macOS 26.2 on Intel Macs?
3
0
238
2w
Do Vendor Listing Plans With Feature Limits Require In-App Purchase?
Hello, I’m seeking clarification on In-App Purchase requirements for a marketplace vendor app offering real-world, offline services. We plan to offer paid vendor listing plans (Free, Silver, Gold, etc.) that provide business benefits such as increased visibility, analytics, and also include feature limits like the number of images a vendor can upload to their business profile and enhanced dashboard views. These plans are intended to support vendors’ real-world businesses and do not provide digital content to consumers. Does gating vendor features such as image upload limits or dashboard capabilities require Apple In-App Purchase under App Store Review Guideline 3.1, or can such vendor plans be processed using a third-party payment gateway as account-based service tiers?
1
0
43
2w
Reply to ModelEntity position values are stale after world recenter (Crown long press)
That is weird! I haven't run into but maybe we have a new bug. Can you share any code that shows how you're reading the position data after recenter? Is there any event, notification, or callback that fires when the world is recentered due to a long press of the Crown button? Yes there is! Check out onWorldRecenter. It may not fix this issue, but you could use it to work around it. https://developer.apple.com/documentation/swiftui/view/onworldrecenter(action:)
Topic: Spatial Computing SubTopic: General Tags:
2w
Reply to Cannot preview in this file – SwiftUI Preview referencing deleted simulator
Hi, Sorry to hear you are having trouble using previews. A few things you could try: Run xcrun simctl --set previews list to see the list of previews sims. Perhaps you'll see the UUID list there Similarly if you wanted to delete all the previews sims run xcrun simctl --set previews delete all If you are still seeing issues we'd suggest filing a feedback report We will need the diagnostics Xcode Previews generates in order to help us understand the error the previews system is encountering. Install the logging profile using instructions available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift On your mac running Xcode, and on your physical preview device (if you are using one). Install the logging profile using the following instructions on your mac running Xcode; and if you are using one, your physical preview device (iOS or visionOS): https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift Then when you reproduce the problem in Xcode:
2w
Local Updates to Live Activities ignored after push update
I'm building out a live activity that has a button which is meant to update the content state of the Live Activity. It calls a LiveActivityIntent that runs in the app process. The push server starts my live activity and the buttons work just fine. I pass the push token back to the server for further updates and when the next update is pushed by the server the buttons no longer work. With the debugger I'm able to verify the app intent code runs and passes the updated state to the activity. However the activity never updates or re-renders. There are no logs in Xcode or Console.app that indicates what the issue could be or that the update is ignored. I have also tried adding the frequent updates key to my plist with no change. I'm updating the live activity in the LiveActivityIntent like this: public func perform() async throws -> some IntentResult { let activities = Activity.activities for activity in activities { let currentState = activity.content.state let currentIndex = currentState.pageIndex ??
3
0
130
2w
iOS 26 & Xcode 26 - bug with keyboard by WebView
Environment iOS 26 (23A343) Xcode 26 Reproduces on device and Simulator Description When presenting a SwiftUI WebView (native iOS 26 component) or a WKWebView/UIWebView via UIViewRepresentable, focusing a text field inside the web view and then dismissing it breaks the keyboard layout behavior. After returning to the main app, tapping any TextField causes the keyboard to cover bottom controls (e.g. buttons). Expected safe area insets are not applied. The issue is only resolved after closing and reopening the keyboard once. Steps to Reproduce Open a SwiftUI screen with WebView (via .sheet or NavigationLink). Inside the web view, tap a text field to show the keyboard. Dismiss the web view. Tap a TextField in the main app. Expected Result Layout should adjust correctly. Bottom controls stay visible above the keyboard. Actual Result Keyboard covers bottom controls. Insets are ignored until the keyboard is dismissed and reopened. Notes Reproduces with: Native SwiftUI WebView (iOS 26) WKW
3
0
1.1k
2w
Apps do not trigger pop-up asking for permission to access local network on macOS Sequoia/Tahoe
We are having an issue with the Local Network permission pop-up not getting triggered for our apps that need to communicate with devices via local network interfaces/addresses. As we understand, apps using UDP should trigger this, causing macOS to prompt for access, or, if denied, fail to connect. However, we are facing issues with macOS not prompting this popup at all. Here are important and related points: Our application is packaged as a .app package and distributed independently (not on the App Store). The application controls hardware that we manufacture. In order to find the hardware on the network, we send a UDP broadcast with a message for our hardware on the local network, and the hardware responds with a message back. However, the popup (to ask for permission) never shows up. The application is not able to find the hardware device. It is interesting to note that data is still sent out to the network (without the popup) but we receive back the wrong data. The behaviour is consistent macOS Sequoia (an
5
0
204
2w
Message Filter Extension Not Working on iOS 26.1
Hello, We are using a Message Filter Extension (ILMessageFilterExtension) to classify SMS/iMessage content (junk vs allow) in our app. After testing on iOS 26.1, we want to confirm whether there are any behavioral, performance, or API-level changes that impact message filtering, such as: Changes in how often the filter extension is invoked Differences in classification accuracy or system overrides New privacy, entitlement, or permission-related restrictions Execution time limits or memory constraints Any changes specific to iMessage vs SMS filtering We did not find any explicit mention of Message Filter Extensions in the iOS 26.1 release notes and would like to confirm whether the existing behavior from previous iOS versions remains unchanged. Has Apple introduced any known or undocumented changes in iOS 26.1 that developers should be aware of when supporting Message Filter Extensions? Sometime I also found unpredictable behaviour on iOS version 18.5 or below, like sometime it works but sometimes sta
3
0
207
2w
Animation Glitch behind Tab-bar
I'm trying to replicate edit/select mode of iOS 26 photos app. When user clicks Select button, bottom tab bar is replaced by the toolbar buttons. When I press Done button, a white opaque bar appears at the bottom behind the tabbar. It looks pretty straightforward to implement but I'm banging my head here now. Any help will be appreciated. Code and animation frames attached bellow struct ContentView: View { var body: some View { TabView(selection: $selectedTab) { OverviewView() .tabItem { Image(systemName: chart.pie) Text(Overview) } .tag(0) //rest of the tabs } } } struct OverviewView: View { @State private var editActive = false @State private var selection = Set() @State private var items = [ Item 1, Item 2, Item 3, ] var body: some View { NavigationStack { List(selection: $selection) { ForEach(items, id: .self) { item in Text(item) } } .toolbar { if editActive { ToolbarItem(placement: .bottomBar) { Button { } label: { Label(Delete, systemImage: trash) } } ToolbarItem(placement: .bottomBar) { Butto
1
0
116
2w