Construct and manage graphical, event-driven user interfaces for iOS or tvOS apps using UIKit.

UIKit Documentation

Post

Replies

Boosts

Views

Activity

UICollectionView + UISearchController - How to achieve smooth scrolling animation when hiding search bar?
I notice that, normal implementation for UICollectionView + UISearchController, will not able to achieve smooth scrolling animation when hiding search bar. As you can see in the below video, when we scroll upward the page, it seems like "the page has slipped up suddenly". If we compare the animation with search bar in iOS Settings page, the problem is more obvious. iOS Settings page able to have a smooth scrolling experience. Implementation The following is our implementation. The complete workable project is found at : https://github.com/yccheok/demo-uicollectionview-uisearchcontroller class ViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate { @IBOutlet weak var collectionView: UICollectionView! let reuseIdentifier = "cell" // also enter this string as the cell identifier in the storyboard var items = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48","1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48","1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "bye"] private lazy var searchController: UISearchController = { let searchController = UISearchController(searchResultsController: UIViewController()) searchController.searchResultsUpdater = self searchController.obscuresBackgroundDuringPresentation = true searchController.searchBar.placeholder = "search_todos" searchController.searchBar.delegate = self return searchController }() override func viewDidLoad() { super.viewDidLoad() collectionView.dataSource = self collectionView.delegate = self navigationItem.searchController = searchController } // MARK: - UICollectionViewDataSource protocol // tell the collection view how many cells to make func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return self.items.count } // make a cell for each cell index path func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { // get a reference to our storyboard cell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! MyCollectionViewCell // Use the outlet in our custom class to get a reference to the UILabel in the cell cell.label.text = self.items[indexPath.item] cell.backgroundColor = .yellow return cell } // MARK: - UICollectionViewDelegate protocol func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { // handle tap events print("You selected cell #\(indexPath.item)!") } } class MyCollectionViewCell: UICollectionViewCell { @IBOutlet weak var label: UILabel! } extension ViewController: UISearchResultsUpdating { func updateSearchResults(for searchController: UISearchController) { } } extension ViewController: UISearchBarDelegate { } Do you have any idea, how we can achieve such a smooth scrolling animation? Thanks.
0
1
607
Nov ’23
Seeking Feedback on UIKit-based SDK Integration with SwiftUI App
I'm developing a standalone xcframework (SDK) for a client's SwiftUI app. The SDK uses UIKit with storyboards for its UI components. The client requests that we avoid accessing the rootViewController from UIWindow and controlling how our screens appear in their app. He wants us to separate those screens and return them for usage in UIHostingController to integrate UIKit views within his SwiftUI screens. My question is about the potential downsides of using the following code for presentation: UIApplication.shared.connectedScenes .flatMap { ($0 as? UIWindowScene)?.windows ?? [] } .first { $0.isKeyWindow }.rootViewController?.present(myViewController, animated: true) Is this approach considered harmful/legacy code or prone to unexpected behavior?
0
2
287
Nov ’23
UITableView Cell is getting focused even when accessibility is disabled in iOS
Accessibility is disabled for tableview cell but it is getting selected.Tableview cell is added as a subview to a view and its accessibility is also disabled.The accessibility value is coming as empty string instead of nil.Imageview is placed inside the tableview cell for that also the accessibility is disabled, still it is getting selected for the cell.Attached the view hierarchy of tableviewcell Sample code: BOOL voiceAccessibility = [screenDelegate getApplicationHasVoiceAccessibility]; if (voiceAccessibility) { if (accEnabled) { [self setIsAccessibilityElement:YES]; if (accLable != nil && accLable.length >0) [self setAccessibilityLabel:accLable]; } else { [self setIsAccessibilityElement:NO]; self.accessibilityTraits = UIAccessibilityTraitNone; } } Alternative Code tried: -(NSString *)accessibilityLabel{ if([m_acclabel isEqualToString:@""] || m_acclabel == nil || m_acclabel.length == 0){ return nil; } return m_acclabel; } Accessibility Inspector Hierarchy:
0
0
442
Nov ’23
iOS 17.0.3 UIDocumentInteractionController print crash
PDF is successfully open in UIDocumentInteractionController but when I tap on share > Print button then app crashes only in iOS 17.0.3 (not tried in iOS 17). It is working fine in iOS 15.8. Crash report "termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"PocketRetail","byPid":341}, "ktriageinfo" : "VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\nVM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\nVM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\nVM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\nVM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\n", "asi" : {"libsystem_c.dylib":["abort() called"]}, "lastExceptionBacktrace" : [{"imageOffset":972256,"symbol":"__exceptionPreprocess","symbolLocation":164,"imageIndex":22},{"imageOffset":179200,"symbol":"objc_exception_throw","symbolLocation":60,"imageIndex":20},{"imageOffset":1516452,"symbol":"-[NSException initWithCoder:]","symbolLocation":0,"imageIndex":22},{"imageOffset":80840,"symbol":"-[UIViewController __supportedInterfaceOrientations]","symbolLocation":808,"imageIndex":24},{"imageOffset":7131796,"symbol":"-[_UIFullscreenPresentationController _prepareForMixedOrientationTransitionIfNecessaryInWindow:fromViewController:toViewController:]","symbolLocation":448,"imageIndex":24},{"imageOffset":7131100,"symbol":"-[_UIFullscreenPresentationController _adjustOrientationIfNecessaryInWindow:forViewController:preservingViewController:]","symbolLocation":932,"imageIndex":24},{"imageOffset":562208,"symbol":"-[UIPresentationController _presentWithAnimationController:inWindow:interactionController:target:didFinish:]","symbolLocation":524,"imageIndex":24},{"imageOffset":7825936,"symbol":"-[UIViewController _presentViewController:modalSourceViewController:presentationController:animationController:interactionController:completion:]","symbolLocation":1156,"imageIndex":24},{"imageOffset":7836224,"symbol":"-[UIViewController _presentViewController:withAnimationController:completion:]","symbolLocation":3284,"imageIndex":24},{"imageOffset":7838832,"symbol":"__63-[UIViewController _presentViewController:animated:completion:]_block_invoke","symbolLocation":92,"imageIndex":24},{"imageOffset":7839596,"symbol":"-[UIViewController _performCoordinatedPresentOrDismiss:animated:]","symbolLocation":484,"imageIndex":24},{"imageOffset":7838680,"symbol":"-[UIViewController _presentViewController:animated:completion:]","symbolLocation":188,"imageIndex":24},{"imageOffset":7839784,"symbol":"-[UIViewController presentViewController:animated:completion:]","symbolLocation":164,"imageIndex":24},{"imageOffset":299640,"symbol":"-[UIPrintPanelViewController presentPrintPanelAnimated:hostingScene:]","symbolLocation":944,"imageIndex":31},{"imageOffset":25464,"symbol":"__80-[UIPrintInteractionController _presentAnimated:hostingScene:completionHandler:]_block_invoke_2","symbolLocation":204,"imageIndex":31},{"imageOffset":68892,"symbol":"-[UIPrintInteractionController _ensurePDFIsUnlockedFirstAttempt:completionHandler:]","symbolLocation":384,"imageIndex":31},{"imageOffset":24440,"symbol":"-[UIPrintInteractionController _presentAnimated:hostingScene:completionHandler:]","symbolLocation":620,"imageIndex":31},{"imageOffset":460048,"symbol":"-[UIPrintActivity performActivity]","symbolLocation":272,"imageIndex":32},{"imageOffset":449908,"symbol":"-[SHSheetActivityPerformer _performPresentationWithViewController:]","symbolLocation":452,"imageIndex":32},{"imageOffset":1218716,"symbol":"-[UIPresentationController transitionDidFinish:]","symbolLocation":1096,"imageIndex":24},{"imageOffset":1217384,"symbol":"__56-[UIPresentationController runTransitionForCurrentState]_block_invoke.111","symbolLocation":336,"imageIndex":24},{"imageOffset":1216900,"symbol":"-[_UIViewControllerTransitionContext completeTransition:]","symbolLocation":116,"imageIndex":24},{"imageOffset":544956,"symbol":"__UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK__","symbolLocation":36,"imageIndex":24},{"imageOffset":542804,"symbol":"-[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:]","symbolLocation":624,"imageIndex":24},{"imageOffset":540364,"symbol":"-[UIViewAnimationState sendDelegateAnimationDidStop:finished:]","symbolLocation":436,"imageIndex":24},{"imageOffset":418968,"symbol":"-[UIViewAnimationState animationDidStop:finished:]","symbolLocation":196,"imageIndex":24},{"imageOffset":419244,"symbol":"-[UIViewAnimationState animationDidStop:finished:]","symbolLocation":472,"imageIndex":24},{"imageOffset":468844,"symbol":"run_animation_callbacks(void*)","symbolLocation":132,"imageIndex":33},{"imageOffset":17152,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":21},{"imageOffset":76184,"symbol":"_dispatch_main_queue_drain","symbolLocation":984,"imageIndex":21},{"imageOffset":75184,"symbol":"_dispatch_main_queue_callback_4CF","symbolLocation":44,"imageIndex":21},{"imageOffset":227772,"symbol":"__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__","symbolLocation":16,"imageIndex":22},{"imageOffset":214728,"symbol":"__CFRunLoopRun","symbolLocation":1996,"imageIndex":22},{"imageOffset":212504,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":22},{"imageOffset":13804,"symbol":"GSEventRunModal","symbolLocation":164,"imageIndex":23},{"imageOffset":2290428,"symbol":"-[UIApplication _run]","symbolLocation":888,"imageIndex":24},{"imageOffset":2287928,"symbol":"UIApplicationMain","symbolLocation":340,"imageIndex":24},{"imageOffset":156240,"symbol":"main","symbolLocation":60,"imageIndex":15},{"imageOffset":23876,"symbol":"start","symbolLocation":2104,"imageIndex":25}],
2
1
727
Nov ’23
On iOS 17, UICollectionView updates trigger a resignFirstResponder call even when the cell with the text input is unaffected
I have a view with search functionality implemented with a UICollectionView. In a cell in section 0 there's a UITextField used for input. Changes in it trigger an update, during which collectionView.performBatchUpdates is called, with the updates block containing insertSections, deleteSections and reloadSections calls that only affect higher section indices. On previous iOS versions there are no issues here, but starting on iOS 17, keyboard drops after every character entered. Adding a symbolic breakpoint on -[UIResponder resignFirstResponder] results in a break on the collectionView.performBatchUpdates call with the following UIKit methods in the stack trace above it: #0 0x00000001852e5b78 in -[UIResponder resignFirstResponder] () #1 0x00000001855d6bcc in -[UITextField resignFirstResponder] () #2 0x0000000184a38f34 in -[UICollectionView _resignOrRebaseFirstResponderViewWithIndexPathMapping:] () #3 0x0000000184a37394 in -[UICollectionView _updateWithItems:tentativelyForReordering:propertyAnimator:collectionViewAnimator:] () #4 0x0000000184a309f0 in -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:collectionViewAnimator:] () #5 0x0000000184a3a808 in -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:animator:animationHandler:] ()
4
1
1.1k
Nov ’23
AR Quick Look in swift ui
HI, I'm new to IOS Dev. I am developing an app with AR function. I found there are a few tutorials about AR Quick Look. However, they're all use storyboard. Is there any way to use swift ui to demonstrate AR Quick Look. ContentView.swift import SwiftUI //import QuickLook //import ARKit struct ContentView: View { @State private var isPresented = false var body: some View { VStack { Button { isPresented = true print("click") } label: { Text("Click to AR") .font(.title) .fontWeight(.bold) .padding() .background() .cornerRadius(16) } .sheet(isPresented: $isPresented) { ARView() } .padding() } } } #Preview { ContentView() } ARView.swift import SwiftUI struct ARView: UIViewControllerRepresentable { func makeUIViewController(context: Context) -> QuickViewController { QuickViewController() } func updateUIViewController(_ uiViewController: QuickViewController, context: Context) { uiViewController.presentARQuickLook() } typealias UIViewControllerType = QuickViewController } QuickViewController.swift import UIKit import QuickLook import ARKit class QuickViewController: UIViewController, QLPreviewControllerDelegate, QLPreviewControllerDataSource { // 有幾個模型要呈現 func numberOfPreviewItems(in controller: QLPreviewController) -> Int { return 1 } // 顯示模型 func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem { let url = Bundle.main.url(forResource: "bear", withExtension: "usdz")! // Load file url let preview = ARQuickLookPreviewItem(fileAt: url) return preview } func presentARQuickLook() { let previewController = QLPreviewController() previewController.dataSource = self present(previewController, animated: true) print("Open AR model!") } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } /* // MARK: - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. } */ }
0
0
838
Nov ’23
Document Picker does not work on device
I have a problem with Xcode version 15.0.1: I have programmed a DocumentPicker in Swift UI to load a document from my own cloud into the app. When I run the app, it works fantastic with the simulator, but it doesn't work with my device. I always get the following error message: file is not reachable. Ensure file URL is not a directory, symbolic link, or invalid url. As I said, when I run the code in the simulator, it works fine. I am using IOS 17.2 Here is the code. import SwiftUI import MobileCoreServices import Firebase import FirebaseStorage import CoreData import UniformTypeIdentifiers struct DocumentPickerView: UIViewControllerRepresentable { @Binding var fileContent : String @Binding var nameContent : String @Binding var showqr : Bool @Binding var documentURL: URL? @Binding var alert: Bool // @Binding var webViewURL : URL func makeCoordinator() -> Coordinator { Coordinator(self) } func makeUIViewController(context: Context) -> UIDocumentPickerViewController { // let picker = UIDocumentPickerViewController(documentTypes: ["public.item"], in: .import) let types: [UTType] = [UTType.content] let picker = UIDocumentPickerViewController(forOpeningContentTypes:types) picker.allowsMultipleSelection = false picker.delegate = context.coordinator return picker } func updateUIViewController(_ uiViewController: UIDocumentPickerViewController, context: Context) {} class Coordinator: NSObject, UIDocumentPickerDelegate { var parent: DocumentPickerView init(_ parent: DocumentPickerView) { self.parent = parent } func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { if let selectedURL = urls.first { parent.documentURL = selectedURL parent.uploadToFirebase(selectedURL) } } } func uploadToFirebase(_ fileURL: URL) { let storage = Storage.storage() let storageRef = storage.reference() let fileRef = storageRef.child(fileURL.lastPathComponent) // if FileManager.default.fileExists(atPath: fileURL.path){ // print("File Existiert:\(fileURL)") // } else { // print("File Existiert nicht") // } _ = fileRef.putFile(from: fileURL, metadata: nil){ (metadata, error) in if let error = error { print("Fehler beim Hochladen der Datei: \(error.localizedDescription)") } else { print("Datei erfolgreich hochgeladen!") // Rufen Sie die Download-URL für die hochgeladene Datei ab fileRef.downloadURL { (url, error) in if let error = error { alert = true print("Fehler beim Abrufen der Download-URL: \(error.localizedDescription)") } else { if let downloadURL = url { print("Download-URL: \(downloadURL)") self.fileContent = "\(downloadURL)" self.showqr = true } } } } } } }
2
0
1.2k
Nov ’23
iOS: Get next word predictions
Does iOS provide an API for getting text predictions based on previous text? I tried with UITextChecker.completions as such let str = "Hello" let range = NSMakeRange(str.utf16.count, 0) let tc = UITextChecker() let completions = tc.completions(forPartialWordRange: range, in: str, language: "en-US") print(completions) However, this only works for completing words, not sentences. Does iOS have a way of doing this? I read somewhere that macOS does. If not, what workarounds/alternatives would you recommend?
0
0
684
Nov ’23
iOS 17 UIImageView tintColor issue
Applying color picked from UIColorPickerViewController to UIImageview's tintColor(a color having kCGColorSpaceModelRGB ColorSpace), then getting tintColor from that same UIImageView is always giving me gray color(a color having uiextendedgraycolorspace ColorSpace), this issue occured only in iOS 17 What can be the issue and please help me to solve it.
2
0
621
Nov ’23
SwiftUI Third Party Keyboard
Hello. I am developing an app that helps people with language issues communicate and for that I thought I could do a custom keyboard for them. I was wondering if there is a way of doing a 3rd party keyboard using SwiftUI (little to no UIKit) and if so, where can I find documentation/tutorials. I have looked with no success. Additionally, can we use a PKCanvasView inside of keyboards (ie, is there any restriction/policy)? I intend to use it so that users can draw the words they're looking for (I already have the model and know how to come up with the suggestions and everything) Thanks a lot!
0
0
642
Nov ’23
There are a lot of crashes in iOS17 and above
Hardware Model: iPhone15,3 Process: 甘草医生 [2305] Path: /private/var/containers/Bundle/Application/18AF408C-3B8B-4829-8621-4CCC16013765/甘草医生.app/甘草医生 Identifier: com.gancaoDoctor.doctor Version: 4.5.6 (45600) AppStoreTools: 15A240a AppVariant: 1:iPhone15,3:16 Code Type: ARM-64 (Native) Role: unknown Parent Process: launchd [1] Coalition: com.gancaoDoctor.doctor [1214] Date/Time: 2023-10-28 21:17:48.9795 +0800 Launch Time: 2023-10-28 21:10:32.0919 +0800 OS Version: iPhone OS 17.1 (21B74) Release Type: User Baseband Version: 2.10.03 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000524f185b80 Exception Codes: 0x0000000000000002, 0x000000524f185b80 VM Region Info: 0x524f185b80 is in 0x524f184000-0x7000000000; bytes after start: 7040 bytes before end: 127522022527 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL commpage (reserved) 1000000000-524f184000 [265.2G] ---/--- SM=NUL ...(unallocated) ---> GPU Carveout (reserved) 524f184000-7000000000 [118.8G] ---/--- SM=NUL ...(unallocated) UNUSED SPACE AT END Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 libobjc.A.dylib 0x00000001936433cc class_getMethodImplementation + 56 (objc-class.mm:702) 1 Foundation 0x000000019a230c74 _NSKVONotifyingOriginalClassForIsa + 32 (NSKeyValueObserverNotifying.m:950) 2 Foundation 0x000000019a230924 _NSKeyValueObservationInfoGetObservances + 280 (NSKeyValueObservationInfo.m:820) 3 Foundation 0x000000019a22fddc NSKeyValueWillChangeWithPerThreadPendingNotifications + 232 (NSKeyValueObserving.m:1199) 4 QuartzCore 0x000000019c9647a8 CA::Display::Display::update() + 2564 (CADisplay.mm:2904) 5 QuartzCore 0x000000019c9c8658 invocation function for block in ensure_displays() + 136 (CADisplay.mm:6040) 6 libsystem_notify.dylib 0x00000001c5efdbec ___notify_dispatch_local_notification_block_invoke + 72 (notify_client.c:2044) 7 libdispatch.dylib 0x00000001a3240250 _dispatch_block_async_invoke2 + 148 (queue.c:555) 8 libdispatch.dylib 0x00000001a3231300 _dispatch_client_callout + 20 (object.m:561) 9 libdispatch.dylib 0x00000001a323f998 _dispatch_main_queue_drain + 984 (queue.c:7813) 10 libdispatch.dylib 0x00000001a323f5b0 _dispatch_main_queue_callback_4CF + 44 (queue.c:7973) 11 CoreFoundation 0x000000019b2ab20c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780) 12 CoreFoundation 0x000000019b2a7f18 __CFRunLoopRun + 1996 (CFRunLoop.c:3149) 13 CoreFoundation 0x000000019b2a7668 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 14 GraphicsServices 0x00000001de6725ec GSEventRunModal + 164 (GSEvent.c:2196) 15 UIKitCore 0x000000019d6c4294 -[UIApplication _run] + 888 (UIApplication.m:3685) 16 UIKitCore 0x000000019d6c38d0 UIApplicationMain + 340 (UIApplication.m:5270) 17 甘草医生 0x00000001049b64a8 main + 168 (main.m:22) 18 dyld 0x00000001bdcfadcc start + 2240 (dyldMain.cpp:1269)
0
0
317
Nov ’23
-[UINavigationController pushViewController:transition:forceImmediate:]
Fatal Exception: NSInvalidArgumentException <UIPrintPanelNavigationController: 0x144010a00> is pushing the same view controller instance (<UIPrinterBrowserViewController: 0x142854400>) more than once which is not supported and is most likely an error in the application : com.myapp.myapp Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0xec870 __exceptionPreprocess 1 libobjc.A.dylib 0x2bc00 objc_exception_throw 2 UIKitCore 0xcb284 -[UINavigationController pushViewController:transition:forceImmediate:] 3 UIKitCore 0xca398 -[UINavigationController pushViewController:animated:] 4 PrintKitUI 0x45024 -[UIPrintPanelNavigationController pushViewController:animated:] 5 UIKitCore 0x129b78 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] 6 UIKitCore 0x129680 -[_UIViewControllerTransitionContext _runAlongsideCompletions] 7 UIKitCore 0x128d10 -[_UIViewControllerTransitionContext completeTransition:] 8 UIKitCore 0x7a3d48 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke_5 9 UIKitCore 0x84a38 __UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK__ 10 UIKitCore 0x841d0 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] 11 UIKitCore 0x83848 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] 12 UIKitCore 0x65aa4 -[UIViewAnimationState animationDidStop:finished:] 13 UIKitCore 0x65bb8 -[UIViewAnimationState animationDidStop:finished:] 14 QuartzCore 0x72098 run_animation_callbacks(void*) 15 libdispatch.dylib 0x4300 _dispatch_client_callout 16 libdispatch.dylib 0x12998 _dispatch_main_queue_drain 17 libdispatch.dylib 0x125b0 _dispatch_main_queue_callback_4CF 18 CoreFoundation 0x3720c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ 19 CoreFoundation 0x33f18 __CFRunLoopRun 20 CoreFoundation 0x33668 CFRunLoopRunSpecific 21 GraphicsServices 0x35ec GSEventRunModal 22 UIKitCore 0x22c2b4 -[UIApplication _run] 23 UIKitCore 0x22b8f0 UIApplicationMain 24 MyApp 0x4a940 main + 14 (main.m:14) 25 ??? 0x1ac55adcc (Missing) I found this crash in Firebase crashlytics. This is device info Model:iPad Air (5th generation) Version:17.1.1 Orientation:Landscape Please help me to findout the root cause of the crash and possible solution. I have tried to reprduce the crash but didn't reproduce.
1
0
948
Nov ’23
UIContentUnavailableConfiguration and Accessibility VoiceOver
I have been implementing UIContentUnavailableConfigurations in my app and I've noticed that when contentUnavailableConfiguration changes via func updateContentUnavailableConfiguration(using state: UIContentUnavailableConfigurationState) VoiceOver does not focus on the content of the UIContentUnavailableConfiguration. It either focuses on the NavBar back button or on a subview behind the content unavailable overlay. I've looked at using UIAccessibility.post(notification: UIAccessibility.Notification.screenChanged, argument: nil) but I can't find an accessibility element to provide as an argument. Is there a way to focus VoiceOver on the UIContentUnavailableView when contentUnavailableConfiguration changes?
0
0
291
Nov ’23
*** Assertion failure in -[_UISystemBackgroundView _internalSubviewsOfType:], _UISystemBackgroundView.m:133
Our application was working fine in iOS 16, but after upgrading to iOS 17.1.1, we see a 100% reproducible crash when generating a cell in the [UITableViewDataSource tableView: cellForRowAtIndexPath:] callback for a particular table. I've only found a single table so far where it crashes. This is the line of code where it crashes: ItemContentTableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier forIndexPath:indexPath]; The crash occurs on the first call. Since it only crashes in this one table, I imagine it's somehow related to the particulars of the cell content layout, but as far as I can see, there's nothing spectacular going on there. Any ideas?? Thanks.
4
0
743
Nov ’23
Share submenu in Mac Catalyst and UICommandTagShare
With Mac Catalyst, in Big Sur and Monterey, you could use UICommandTagShare as the property list for a UICommand in combination with activityItemsConfiguration and itemProvidersForActivityItemsConfiguration to allow a "Share" submenu to appear in a menu in your app (for instance, under the File menu like many other apps). Starting in Ventura, this submenu no longer appears with that same code, and instead the UICommandTagShare command in the menu now just displays "Share" with no submenu, which triggers a UIActivityViewController to appear in the main window. Is there any way to still allow a Share submenu to work in Ventura and beyond with Mac Catalyst? Thanks so much for any help!
1
1
569
Dec ’23