Provide views, controls, and layout structures for declaring your app's user interface using SwiftUI.

SwiftUI Documentation

Post

Replies

Boosts

Views

Activity

How to integrate Pencil into my application? I have encountered a problem.
我是个新手。我是UIKit的新手。我真的不知道该怎么办。我的问题是,我希望用铅笔绘制的图纸在PencilCreate中显示,但我不知道如何控制它们的交付。我需要单击HB才能跳转到铅笔视图界面。然后,铅笔视图界面中绘制的内容可以显示在PencilCreate的.border中。 导入SwiftUI 导入 PencilKit struct GrPencil:查看{ var body:一些视图{ 导航堆栈{ 画布视图() } } } struct CanvasView:UIViewRepresentable { @State var canvasView:PKCanvasView = PKCanvasView() @State var toolPicker = PKToolPicker() func makeUIView(上下文:上下文)-> PKCanvasView { canvasView.drawingPolicy = .anyInput canvasView.becomeFirstResponder() toolPicker.setVisible(true,forFirstResponder:canvasView) toolPicker.addObserver(canvasView) 返回canvasView } func updateUIView(_ uiView: PKCanvasView, context: Context) { } } #预览 { GrPencil() } 导入SwiftUI 导入 PencilKit struct PencilCreate:查看{ @State var drawing = PKDrawing() var body:一些视图{ VStack { VStack { 图像(uiImage:drawing.image(来自:drawing.bounds,比例:1)) .resizable() .框架(宽度:200,高度:120) .border(颜色.黑色) 按钮{ }标签:{ 文本(“HB”) } } } } } #预览 { PencilCreate() }
0
0
89
1w
Vertical ScrollView Height and Paging Offset Issues in SwiftUI
Hi everyone, I'm currently working on an iOS app using SwiftUI, and I'm facing an issue with a vertical ScrollView. My goal is to have the ScrollView take up all the safe area space plus the top inset (with the bottom inset being an ultra-thin material) and enable paging behavior. However, I'm encountering two problems: The initial height of the ScrollView is too high (dragging the view (even without changing the page) adjusts the size). The paging offset of the ScrollView is incorrect (page views are not aligned). I’ve tried many things and combinations in desperation, including padding, safeAreaPadding, contentMargins, frame, fixedSize, containerRelativeFrame with callback, custom layout, and others, but nothing seems to work. If by any chance someone can help me find a solution, I’d greatly appreciate it. I suspect there are issues with the height defined by the ScrollView when some safe areas are ignored, leading to strange behavior when trying to set the height. It's challenging to explain everything in a simple post, so if someone from the SwiftUI team could look into this potential bug, that would be incredibly helpful. Thank you! import SwiftUI struct ScrollViewIssue: View { @State private var items: [(String, Color)] = [ ("One", .blue), ("Two", .green), ("Three", .red), ("Four", .purple) ] var body: some View { ZStack(alignment: .top) { ScrollView(.vertical) { VStack(spacing: 0) { ForEach(items, id: \.0) { item in ItemView(text: item.0, color: item.1) .containerRelativeFrame([.horizontal, .vertical]) } } } .printViewSize(id: "ScrollView") .scrollTargetBehavior(.paging) .ignoresSafeArea(edges: .top) VStack { Text("Title") .foregroundStyle(Color.white) .padding() .frame(maxWidth: .infinity) .background(Color.black.opacity(0.2)) Spacer() } } .printViewSize(id: "ZStack") .safeAreaInset(edge: .bottom) { Rectangle() .frame(width: .infinity, height: 0) .overlay(.ultraThinMaterial) } } } struct ItemView: View { let text: String let color: Color var body: some View { ZStack { RoundedRectangle(cornerRadius: 20) .fill(color.opacity(0.2)) .overlay( color, in: RoundedRectangle(cornerRadius: 20) .inset(by: 10 / 2) .stroke(lineWidth: 10) ) Text(text) } .printViewSize(id: "item") } } struct ViewSizeKey: PreferenceKey { static var defaultValue = CGSize() static func reduce(value: inout CGSize, nextValue: () -> CGSize) { value = nextValue() } } extension View { func printViewSize(id: String) -> some View { background( GeometryReader { proxy in Color.clear .preference(key: ViewSizeKey.self, value: proxy.size) } .onPreferenceChange(ViewSizeKey.self) { value in print("\(id) size:\(value)") } ) } } #Preview { ScrollViewIssue() }
1
0
153
1w
swiftUI animation And ID attribute
struct ContentIDView: View { @State var testID = UUID() @State var b = 0 var body: some View { VStack { Image("video_pic_diy_000") .resizable() .scaledToFit() .contentTransition(.interpolate) .id(testID) .offset(x:CGFloat(b>0 ? 100*b:0)) .animation(.easeInOut(duration: 0.01).delay(0.2), value: b) .onAppear(perform: { print("\(testID)") }) Text("\(testID)") Spacer() Button("Move") { withAnimation(Animation.easeInOut(duration: 0.2)) { b = b+1 testID = UUID() } } } } } In the above code, there is an image and a button, and each time the button is clicked, the image moves 100* the distance of the number of clicks in the x direction from 0, but now each time it moves 100 from where the last move stopped instead of 0. What causes this? In addition, I set the id for Image. When the id changes every time the button is clicked, shouldn't the initial state be restored? Since it is the initial state, why didn't it move from 0?
0
0
67
1w
Issue with observing SwiftData model and UndoManager
I have created a minimum example to demonstrate an issue with observing SwiftData model and UndoManager. This project includes a simple NavigationSplitView, an Item SwiftData model that is being persisted and an enabled UndoManager. Problem: The SwiftData model Item can be observed as expected. Changing the date in the DetailView works as expected and all related views (ListElementView + DetailView) are updated as expected. When pressing ⌘+Z to undo with the enabled UndoManager, deletions or inserts in the sidebar are visible immediately (and properly observed by ContentView). However, when changing the timestamp and pressing ⌘+Z to undo that change, it is not properly observed and immediately updated in the related views (ListElementView + DetailView). Further comments: Undo operation to the model value changes (here: timestamp) are visible in the DetailView when changing sidebar selections Undo operation to the model value changes (here: timestamp) are visible in the ListElementView when restarting the app Undo operation to the model value changes (here: timestamp) are are properly observed and immediately visible in the sidebar, when ommiting the ListElementView (no view encapsulation) Relevant code base: struct ContentView: View { @Environment(\.modelContext) private var modelContext @Query private var items: [Item] @State private var selectedItems: Set<Item> = [] var body: some View { NavigationSplitView { List(selection: $selectedItems) { ForEach(items) { item in ListElementView(item: item) .tag(item) } .onDelete(perform: deleteItems) } .navigationSplitViewColumnWidth(min: 180, ideal: 200) .toolbar { ToolbarItem { Button(action: addItem) { Label("Add Item", systemImage: "plus") } } } } detail: { if let item = selectedItems.first { DetailView(item: item) } else { Text("Select an item") } } .onDeleteCommand { deleteSelectedItems() } } private func addItem() { withAnimation { let newItem = Item(timestamp: Date()) modelContext.insert(newItem) } } private func deleteItems(offsets: IndexSet) { withAnimation { for index in offsets { modelContext.delete(items[index]) } } } private func deleteSelectedItems() { for selectedItem in selectedItems { modelContext.delete(selectedItem) selectedItems.remove(selectedItem) } } } struct ListElementView: View { @Bindable var item: Item var body: some View { Text("Item at \(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))") } } struct DetailView: View { @Bindable var item: Item var body: some View { Text(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard)) DatePicker(selection: $item.timestamp, label: { Text("Change Date:") }) } } @Model final class Item { var timestamp: Date init(timestamp: Date) { self.timestamp = timestamp } } It seems that the UndoManager does not trigger a redraw of the ContentView through the items query? Is this a bug or a feature?
0
0
119
1w
XC Test - Xamarin- Mobile Automation - Tiles missing on list view
Unable to see the first element in a Xamarin forms List view while running the automated UI iOS tests using xctest Element with property in Xamarin forms "ListViewCachingStrategy.RetainElement" , the first element is missing from the list view while running the tests in iOS . Inbetween the tests if we remove the WDA and tried the same scenario, it works as expected. The first element was displayed when working with xamarin forms (v4.7.0.1351) and it is observed with only the current version. Manually trying the same scenario does not have any issues , Elements are displayed as expected, issue is observed only through automation
2
0
132
1w
SwiftUI List OutlineGroup
Hello, I'm having some difficulties trying to customise a SwiftUI list-detail splitview using List and OutlineGroup: The model used is provided in Apple documentation OutlineGroup. The contentView is struct ContentView: View { @State var itemString = String() var body: some View { HSplitView { MyOutLine(title: "MyOutLine", itemString: $itemString) .frame(width: 200, height: 300 , alignment: Alignment(horizontal: .leading, vertical: .top)) .padding() MyView(itemString: itemString) } } } The left view is struct MyOutLine: View { let title:String @Binding var itemString:String @State private var selection: FileItem? var body: some View { List(selection: $selection) { OutlineGroup(data, children: \.children) { item in Text ("\(item.description)") .onTapGesture { selection = item itemString = item.description } .listRowBackground( selection == item ? Color.gray :nil ) } } .listStyle(.sidebar) .onAppear { itemString = "No selection"} } } The right view is: struct MyView: View { let itemString:String var body: some View { VStack{ Spacer() HStack { Spacer() Text(itemString) Spacer() } Spacer() } } } The result works but I have 2 problems: The selection works but the detail view is updated only when I click the text but not when I click the rest of the row. This results in the detail view not being sync with the list selection. I would like to customise the colour of the selected row but listRowBackground does not seem to work. Is there a way to fix this Thank you in advance Jean Marie
2
0
193
2w
Spatial Event
Hello. I am building an AVP app with a C++ engine in Metal. From Swift, I get a spatial event from the layerRenderer, and I want to send the event data to my engine. But I have a problem: I need the event ID value (SpatialEventCollection.Event.ID), which I can see in the debugger (it has a value of 1 or 2 depending on the hand), but I need that value as an Int to pass it to the engine. Any ideas on how to do this? Thanks.
0
0
113
2w
SwiftUI State not reliable updating
Hello, I have a SwiftUI view with the following state variable: @State private var startDate: Date = Date() @State private var endDate: Date = Date() @State private var client: Client? = nil @State private var project: Project? = nil @State private var service: Service? = nil @State private var billable: Bool = false Client, Project, and Service are all SwiftData models. I have some view content that binds to these values, including Pickers for the client/project/service and a DatePicker for the Dates. I have an onAppear listener: .onAppear { switch state.mode { case .editing(let tt): Task { await MainActor.run { startDate = tt.startDate endDate = tt.endDate client = tt.client project = tt.project service = tt.service billable = tt.billable } } default: return } } This works as expected. However, if I remove the Task & MainActor.run, the values do not fully update. The DatePickers show the current date, the Pickers show a new value but tapping on them shows a nil default value. What is also extremely strange is that if tt.billable is true, then the view does update as expected. I am using Xcode 15.4 on iOS simulator 17.5. Any help would be appreciated.
0
0
162
2w
SwiftUI keyboard shortcuts don't become active until view loads
I have a menu bar extra app that includes a sub-menu for lesser used functions. The sub menu implements .keyboardShortcut for a few of the menu items. When the app is first the active app, the keyboard shortcuts only produce a beep UNTIL the sub menu has been accessed. Once the sub-menu has loaded, the keyboard shortcuts work as expected. I should note that the MenuBarExtra is using the .window display mode, if that's important. The submenu appears with a button press within the MenuBarExtra. Is there a method to expose the keyboard shortcuts to the system before the view has loaded?
1
0
111
2w
CompositorLayer, Metal and Alert
Hello. I am creating an app for APV in Metal. I have a CompositorLayer that launches a thread. What can I do to detect the environment alert to stop the thread until it is accepted by the user? If I don't stop the thread, I have problems with the hand tracking alert. Thank you.
1
0
140
2w
NavigationStack with NavigationPath triggers multiple init/deinit of views in stack
Hi all, I've noticed some weird behavior when working NavigationStack paired with a NavigationPath, and I'm wondering if it's by design or perhaps a bug. In short: I'm experiencing that every time I push a new view to the NavigationPath, all the previous views appear to init and deinit, which can cause all sorts of problems if you aren't aware of it happening. It's seems like .navigationDestination(for: ) is run once per item in the path that is given to the NavigationStack. So if you add 3 items it'll run 3 times when adding the third view. But the original views and their state are kept. Is this happening because pushing a view to the stack is seen as a state change? And is it intended? The longer explanation: So I'm developing an app in pure SwiftUI and I'm trying to establish a way of navigating through a router / coordinator. I like that my ViewModels can determine when navigation should happen and not the view. E.g. Normally I'd like to prepare some sort of data that should be transferred to the next view. I've prepared an example project which you can use to check out the issue. It's not a full example of my setup, but it's small enough to show what I'm experiencing. It can be found here: https://github.com/Kimnyhuus/NavigationStackDemo The structure is: Router App RootView AppleView + AppleViewModel BananaView + BananaViewModel PearView + PearViewModel So the Router is an ObservableObject that contains a @Published NavigationPath object + functions for adding / removing to / from stack. I've also added an enum here which defines the destinations that the Router can take an navigate to. RootView is setup with a NavigationStack which is setup with the NavigationPath in the parameter: NavigationStack(path: $router.navPath) { ... } RootView also have the router setup as an EnvironmentObject: .environmentObject(router) This enables the other views to interact with the router and push new views to the stack. Each view is initialized with its corresponding VM. The VMs contain nothing other than init and deinit, a variable containing the initialized id + a @Published num which can be set from the view. This is to keep track of the instances in the prints to the console. Each view can navigate to the two other views. You can try and run the project yourselves, but I've made an example of the inits/deinits that happens here. First, I'm navigating from RootView -> AppleView which is expected. The router prints from func navigate(to destination: Destination) that a view has been pushed to the stack. The RootView prints, when .navigationDestination(for: Destination.self) { ...} is triggered, and it says we're navigating to .apple. And then we see that the AppleVM is inited. All like expected. ||| Router: add to navPath: 1 ||| NavStack: Destination .apple ||| Init ☀️: AppleViewModel, id: 879, num: 0 Then I navigate from AppleView -> BananaView and the weird stuff starts happening. We see that a second view has been added to the stack. BananaVM is inited like we'd expect. But then the previous actions seem to run again but with new instances. ||| Router: add to navPath: 2 ||| NavStack: Destination .banana ||| Init ☀️: BananaViewModel, id: 167, num: 0 ||| NavStack: Destination .apple ||| Init ☀️: AppleViewModel, id: 492, num: 0 Then I navigate from BananaView -> PearView and it's continuing. It's now clear that .navigationDestination(for: Destination.self) { ... } is run once per item in the stack. ||| Router: add to navPath: 3 ||| NavStack: Destination .pear ||| Init ☀️: PearViewModel, id: 436, num: 0 ||| NavStack: Destination .banana ||| Init ☀️: BananaViewModel, id: 292, num: 0 ||| NavStack: Destination .apple ||| Init ☀️: AppleViewModel, id: 434, num: 0 ||| Deinit 🔥: AppleViewModel, id: 492, num: 0 Finally I navigate from PearView to AppleView and it's just piling on. ||| Router: add to navPath: 4 ||| NavStack: Destination .apple ||| Init ☀️: AppleViewModel, id: 738, num: 0 ||| NavStack: Destination .pear ||| Init ☀️: PearViewModel, id: 564, num: 0 ||| NavStack: Destination .banana ||| Init ☀️: BananaViewModel, id: 769, num: 0 ||| Deinit 🔥: BananaViewModel, id: 292, num: 0 ||| NavStack: Destination .apple ||| Init ☀️: AppleViewModel, id: 283, num: 0 ||| Deinit 🔥: AppleViewModel, id: 434, num: 0 Navigating back towards the RootView, you can see that it again inits and deinits different instances of the view models. You’ll notice the original ones with state being deinit’ed where it has a number higher than 0 in “num”. ||| Router: rm navPath: 3 ||| NavStack: Destination .banana ||| Init ☀️: BananaViewModel, id: 222, num: 0 ||| Deinit 🔥: BananaViewModel, id: 769, num: 0 ||| NavStack: Destination .pear ||| Init ☀️: PearViewModel, id: 801, num: 0 ||| Deinit 🔥: PearViewModel, id: 564, num: 0 ||| NavStack: Destination .apple ||| Init ☀️: AppleViewModel, id: 173, num: 0 ||| Deinit 🔥: AppleViewModel, id: 283, num: 0 ||| Deinit 🔥: AppleViewModel, id: 738, num: 0 ||| Router: rm navPath: 2 ||| NavStack: Destination .banana ||| Init ☀️: BananaViewModel, id: 26, num: 0 ||| Deinit 🔥: BananaViewModel, id: 222, num: 0 ||| NavStack: Destination .apple ||| Init ☀️: AppleViewModel, id: 744, num: 0 ||| Deinit 🔥: AppleViewModel, id: 173, num: 0 ||| Deinit 🔥: PearViewModel, id: 801, num: 0 ||| Deinit 🔥: PearViewModel, id: 436, num: 3 ||| Router: rm navPath: 1 ||| NavStack: Destination .apple ||| Init ☀️: AppleViewModel, id: 401, num: 0 ||| Deinit 🔥: AppleViewModel, id: 744, num: 0 ||| Deinit 🔥: BananaViewModel, id: 26, num: 0 ||| Deinit 🔥: BananaViewModel, id: 167, num: 2 ||| Router: rm navPath: 0 ||| Deinit 🔥: AppleViewModel, id: 401, num: 0 ||| Deinit 🔥: AppleViewModel, id: 879, num: 1 What is making NavigationStack / .navigationDestination(for: ) run through all the previous items in the stack, every time the state changes in the NavigationPath? I hope it's not too confusing with all the prints :-) Please let me know if I need to add more info.
1
0
128
2w
Is it possible to get a swiftUI timer-text to align .trailing?
Please consider simple example below. I am trying to put a timer in the upper right corner of a live activity. I am done, it works, but I'm trying to get the timer to look better. If I take a regular text, I can get it to align properly by adjusting the .frame(), , but for a text with a timer inside it, alignment is ignored from what I can see. Text("Hello").frame(width: 90, alignment: .trailing).border(.red) /*Text(timerInterval: timeRange, countsDown: false) .monospacedDigit().font(.subheadline).frame(width: 90, alignment: .trailing).border(.red)*/ } Is there any way to fix this? Right now, I have a fixed width so that HH:mm:ss will fit, but that doesn't look super great if it's just minutes and seconds for example, there's an empty block to the right
1
0
138
2w
NavigationLink/Picker
I have a form container with a Navigation Stack at the top level. In a section I have a Navigation link followed by Picker(s) . On its own the navigation link works correctly but when a HStack with Text and Picker is added the navlink breaks . When the link is selected the picker list is presented. It seems others have had this issue which is usually solved by adding the NavigationStack , which is already at the top level. Any guidance is appreciated ( or work around - I added a section between the link and picker but that didn't help ) Joel
7
0
143
2w
Crash After Presenting SwiftUI Alert
I’m seeing a crash in production for a small percentage of users, and have narrowed it down based on logging to happening as or very shortly after an alert is presented using SwiftUI. This seems to be isolated to iOS 17.5.1, but since it’s a low-volume crash I can’t be sure there aren’t other affected versions. What can I understand from the crash report? Here’s a simplified version of the code which presents the alert, which seems so simple I can’t understand why it would crash. And following that is the crash trace. // View (simplified) @MainActor public struct MyView: View { @ObservedObject var model: MyViewModel public init(model: MyViewModel) { self.model = model } public var body: some View { myViewContent .overlay(clearAlert) } var clearAlert: some View { EmptyView().alert( "Are You Sure?", isPresented: $model.isClearAlertVisible, actions: { Button("Keep", role: .cancel) { model.clearAlertKeepButtonWasPressed() } Button("Delete", role: .destructive) { model.clearAlertDeleteButtonWasPressed() } }, message: { Text("This cannot be undone.") } ) } } // Model (simplified) @MainActor public final class MyViewModel: ObservableObject { @Published var isClearAlertVisible = false func clearButtonWasPressed() { isClearAlertVisible = true } func clearAlertKeepButtonWasPressed() { // No-op. } func clearAlertDeleteButtonWasPressed() { // Calls other code. } } Incident Identifier: 36D05FF3-C64E-4327-8589-D8951C8BAFC4 Distributor ID: com.apple.AppStore Hardware Model: iPhone13,2 Process: My App [379] Path: /private/var/containers/Bundle/Application/B589E780-96B2-4A5F-8FCD-8B34F2024595/My App.app/My App Identifier: com.me.MyApp Version: 1.0 (1) AppStoreTools: 15F31e AppVariant: 1:iPhone13,2:15 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.me.MyApp [583] Date/Time: 2024-06-21 20:09:20.9767 -0500 Launch Time: 2024-06-20 18:41:01.7542 -0500 OS Version: iPhone OS 17.5.1 (21F90) Release Type: User Baseband Version: 4.50.06 Report Version: 104 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x00000001a69998c0 Termination Reason: SIGNAL 5 Trace/BPT trap: 5 Terminating Process: exc handler [379] Triggered by Thread: 0 Kernel Triage: VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter Thread 0 name: Thread 0 Crashed: 0 libswiftCore.dylib 0x00000001a69998c0 _assertionFailure(_:_:file:line:flags:) + 264 (AssertCommon.swift:144) 1 AttributeGraph 0x00000001d0cd61a4 Attribute.init<A>(body:value:flags:update:) + 352 (Attribute.swift:473) 2 SwiftUI 0x00000001ac034054 closure #1 in Attribute.init<A>(_:) + 128 (<compiler-generated>:0) 3 SwiftUI 0x00000001ac033cac partial apply for closure #1 in Attribute.init<A>(_:) + 32 (<compiler-generated>:0) 4 libswiftCore.dylib 0x00000001a6ad0450 withUnsafePointer<A, B>(to:_:) + 28 (LifetimeManager.swift:128) 5 SwiftUI 0x00000001ad624d14 closure #2 in UIKitDialogBridge.startTrackingUpdates(actions:) + 268 (UIKitDialogBridge.swift:370) 6 SwiftUI 0x00000001ad624ae0 UIKitDialogBridge.startTrackingUpdates(actions:) + 248 (UIKitDialogBridge.swift:369) 7 SwiftUI 0x00000001ad6250cc closure #4 in UIKitDialogBridge.showNewAlert(_:id:) + 72 (UIKitDialogBridge.swift:471) 8 SwiftUI 0x00000001abfdd050 thunk for @escaping @callee_guaranteed () -> () + 36 (:-1) 9 UIKitCore 0x00000001aa5722e4 -[UIPresentationController transitionDidFinish:] + 1096 (UIPresentationController.m:651) 10 UIKitCore 0x00000001aa571d88 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.114 + 320 (UIPresentationController.m:1390) 11 UIKitCore 0x00000001aa5cb9ac -[_UIViewControllerTransitionContext completeTransition:] + 116 (UIViewControllerTransitioning.m:304) 12 UIKitCore 0x00000001aa34a91c __UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK__ + 36 (UIView.m:16396) 13 UIKitCore 0x00000001aa34a800 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 624 (UIView.m:16429) 14 UIKitCore 0x00000001aa349518 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 436 (UIView.m:0) 15 UIKitCore 0x00000001aa356b14 -[UIViewAnimationState animationDidStop:finished:] + 192 (UIView.m:2400) 16 UIKitCore 0x00000001aa356b84 -[UIViewAnimationState animationDidStop:finished:] + 304 (UIView.m:2422) 17 QuartzCore 0x00000001a96f8c50 run_animation_callbacks(void*) + 132 (CALayer.mm:7714) 18 libdispatch.dylib 0x00000001aff61dd4 _dispatch_client_callout + 20 (object.m:576) 19 libdispatch.dylib 0x00000001aff705a4 _dispatch_main_queue_drain + 988 (queue.c:7898) 20 libdispatch.dylib 0x00000001aff701b8 _dispatch_main_queue_callback_4CF + 44 (queue.c:8058) 21 CoreFoundation 0x00000001a808f710 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780) 22 CoreFoundation 0x00000001a808c914 __CFRunLoopRun + 1996 (CFRunLoop.c:3149) 23 CoreFoundation 0x00000001a808bcd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 24 GraphicsServices 0x00000001ecf3c1a8 GSEventRunModal + 164 (GSEvent.c:2196) 25 UIKitCore 0x00000001aa6c490c -[UIApplication _run] + 888 (UIApplication.m:3713) 26 UIKitCore 0x00000001aa7789d0 UIApplicationMain + 340 (UIApplication.m:5303) 27 SwiftUI 0x00000001ac27c148 closure #1 in KitRendererCommon(_:) + 168 (UIKitApp.swift:51) 28 SwiftUI 0x00000001ac228714 runApp<A>(_:) + 152 (UIKitApp.swift:14) 29 SwiftUI 0x00000001ac2344d0 static App.main() + 132 (App.swift:114) 30 My App 0x00000001001e7bfc static MyApp.$main() + 52 (MyApp.swift:0) 31 My App 0x00000001001e7bfc main + 64 32 dyld 0x00000001cb73de4c start + 2240 (dyldMain.cpp:1298)
2
0
210
3w