Post

Replies

Boosts

Views

Activity

iOS 26 - ToolbarItem with .keyboard placement adds additional positive/negative top margin
Since iOS 26, when using toolbar items with .keyboard placement, the view inside the hierarchy which is pushed, does not directly stick to the toolbar anymore when a text field is focused, creating a gap, or moving the view below the toolbar. Focusing another field pushes the layout below the toolbar. Minimal example to reproduce the issue. import SwiftUI import Foundation @main struct testfocusApp: App { @State var showSheet = false var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { enum Field: Hashable { case body case title } @State var titleText = "" @State var bodyText = "" @FocusState private var focusedField: Field? var body: some View { NavigationView { VStack(spacing: 0) { ScrollView { VStack(spacing: 16) { TextField("", text: $titleText) .onSubmit { focusedField = .body } .background(Color.red) .focused($focusedField, equals: .title) VStack(spacing: 0) { VStack { Text(bodyText) .padding(.vertical, 9) .padding(.horizontal, 5) .hidden() TextEditor( text: $bodyText ) .focused($focusedField, equals: .body) } } } .padding(20) } Spacer() VStack(spacing: 16) { Text("message") Button { } label: { Text("Save") .frame(maxWidth: .infinity) } } .border(Color.red) .background(Color.green) } .background(Color.yellow) .border(Color.purple) .toolbar { ToolbarItem(placement: .keyboard) { Button("Done") { } .border(Color.purple) } } } } }
1
0
96
3d
PHPickerViewController crashing with _PFAssertFailHandler
Hello, we are embedding a PHPickerViewController with UIKit (adding the vc as a child vc, embedding the view, calling didMoveToParent) in our app using the compact mode. We are disabling the following capabilities .collectionNavigation, .selectionActions, .search. One of our users using iOS 17.2.1 and iPhone 12 encountered a crash with the following stacktrace: Crashed: com.apple.main-thread 0 libsystem_kernel.dylib 0x9fbc __pthread_kill + 8 1 libsystem_pthread.dylib 0x5680 pthread_kill + 268 2 libsystem_c.dylib 0x75b90 abort + 180 3 PhotoFoundation 0x33b0 -[PFAssertionPolicyCrashReport notifyAssertion:] + 66 4 PhotoFoundation 0x3198 -[PFAssertionPolicyComposite notifyAssertion:] + 160 5 PhotoFoundation 0x374c -[PFAssertionPolicyUnique notifyAssertion:] + 176 6 PhotoFoundation 0x2924 -[PFAssertionHandler handleFailureInFunction:file:lineNumber:description:arguments:] + 140 7 PhotoFoundation 0x3da4 _PFAssertFailHandler + 148 8 PhotosUI 0x22050 -[PHPickerViewController _handleRemoteViewControllerConnection:extension:extensionRequestIdentifier:error:completionHandler:] + 1356 9 PhotosUI 0x22b74 __66-[PHPickerViewController _setupExtension:error:completionHandler:]_block_invoke_3 + 52 10 libdispatch.dylib 0x26a8 _dispatch_call_block_and_release + 32 11 libdispatch.dylib 0x4300 _dispatch_client_callout + 20 12 libdispatch.dylib 0x12998 _dispatch_main_queue_drain + 984 13 libdispatch.dylib 0x125b0 _dispatch_main_queue_callback_4CF + 44 14 CoreFoundation 0x3701c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 15 CoreFoundation 0x33d28 __CFRunLoopRun + 1996 16 CoreFoundation 0x33478 CFRunLoopRunSpecific + 608 17 GraphicsServices 0x34f8 GSEventRunModal + 164 18 UIKitCore 0x22c62c -[UIApplication _run] + 888 19 UIKitCore 0x22bc68 UIApplicationMain + 340 20 WorkAngel 0x8060 main + 20 (main.m:20) 21 ??? 0x1bd62adcc (Missing) Please share if you have any ideas as to what might have caused that, or what to look at in such a case. I haven't been able to reproduce this myself unfortunately.
2
0
854
Feb ’24