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

UIKit Documentation

Post

Replies

Boosts

Views

Activity

UIDocumentInteractionController keyboard trap
We are using UIDocumentInteractionController to preview a pdf. When you navigate on your phone with the hardware keyboard and it focuses on the pfd preview, there is no way we can reach the buttons in the toolbar anymore like the share and done button. Is this a bug or is there a way to get to the navigation/toolbars? iOS17.0 iPhone14 sim and real device.
2
0
489
Feb ’24
Xcode 13.2.1 : alert mishandling on Iphone but working on simulator ???
Hello everyone! I'm just working on my first app in swift, and am out of knowledge about this case. First, the related code : `@IBAction func ajouterNouvelleValeur(_ sender: Any) { // Créer une alerte pour saisir la nouvelle valeur let alert = UIAlertController(title: "Ajouter une nouvelle valeur", message: nil, preferredStyle: .alert) alert.addTextField { (textField) in textField.placeholder = "Entrez la nouvelle valeur" } // Ajouter un bouton "Ajouter" pour ajouter la nouvelle valeur alert.addAction(UIAlertAction(title: "Ajouter", style: .default, handler: { [weak self] action in guard let textField = alert.textFields?.first, let newValue = textField.text else { return } self?.ajouterNouvelleValeur(newValue) })) // Ajouter un bouton "Annuler" alert.addAction(UIAlertAction(title: "Annuler", style: .cancel, handler: nil)) // Afficher l'alerte present(alert, animated: true, completion: nil) } this to present an alert with textField to enter a new value to an array. Works properly on simulator, but when testing on my iPhone12 SE, it appears not to catch any value for the textField. Has anyone encountered the same issue, and knows the solution? Hope my english is not too bad (as a French member, I appologize if not!) Best regards Sébastien
1
0
539
Feb ’24
CollectionView not calling didSelectItemAt correctly
I have a CollectionView in my SwiftUI App. The collectionView is wrapped in a UIViewRepresentable. If I tap on a collectionView cell normally the function isn't called but if I hold the cell down the console prints <0x107507790> Gesture: System gesture gate timed out. and when I let go of the cell after that's printed then didSelectItem is called. Here is my CollectionView Class: class SessionsCollectionView: UIView, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { lazy var collectionView: UICollectionView = { let layout = UICollectionViewFlowLayout() layout.minimumInteritemSpacing = 0 layout.minimumLineSpacing = 30 let collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout) collectionView.translatesAutoresizingMaskIntoConstraints = false collectionView.dataSource = self collectionView.delegate = self collectionView.clipsToBounds = false collectionView.delaysContentTouches = false collectionView.register(SessionCell.self, forCellWithReuseIdentifier: "cell") collectionView.register(SessionsHeader.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "header") return collectionView }() override init(frame: CGRect) { super.init(frame: frame) self.backgroundColor = .clear setupCollectionView() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupCollectionView() { addSubview(collectionView) collectionView.backgroundColor = .clear collectionView.alwaysBounceVertical = true collectionView.alwaysBounceHorizontal = false collectionView.delaysContentTouches = false collectionView.contentInset = .init(top: 20, left: 0, bottom: 20, right: 0) collectionView.showsVerticalScrollIndicator = false NSLayoutConstraint.activate([ collectionView.topAnchor.constraint(equalTo: topAnchor), collectionView.leadingAnchor.constraint(equalTo: leadingAnchor), collectionView.trailingAnchor.constraint(equalTo: trailingAnchor), collectionView.bottomAnchor.constraint(equalTo: bottomAnchor) ]) } // MARK: Header func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { if kind == UICollectionView.elementKindSectionHeader { let sectionHeader = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "header", for: indexPath) as! Header return sectionHeader } } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { let width: CGFloat = collectionView.frame.width let height: CGFloat = 33 + 20 return CGSize(width: width, height: height) } // MARK: - UICollectionViewDataSource func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 10 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! SessionCell return cell } // MARK: - UICollectionViewDelegateFlowLayout func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let width = collectionView.bounds.width let height = 150 return CGSize(width: collectionView.bounds.width, height: height) } func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { print(indexPath.row) } } struct SessionsCollectionViewWrapper: UIViewRepresentable { var sessionViewNavigation: SessionViewNavigation func makeUIView(context: Context) -> SessionsCollectionView { let sessionsCollectionView = SessionsCollectionView() return sessionsCollectionView } func updateUIView(_ uiView: SessionsCollectionView, context: Context) { // Update any properties or handle updates if needed } }
2
0
1.2k
Feb ’24
How to cancel a Drag/Drop item loading in UIKit
After a drag/drop of an item into my app's collectionView, UIKit shows this progress UI while the data loads: How do I cancel the loading of the dropped items when the user cancels? The itemProvider.loadFileRepresentation completion block is always called without error. What am I missing? coordinator.session.progress.cancellationHandler = { Task { @MainActor in // User canceled the dropped items loading } } for item in coordinator.items { item.dragItem.itemProvider.loadFileRepresentation(forTypeIdentifier: AVFileType.mov.rawValue) { [ weak self] (videoURL, error) in // This completion block will get called even after operation was canceled. } }
0
0
417
Feb ’24
Convert from SQLite database in UIKit to storage on iCloud
My apps are set up to store data in a SQLite database on the device. The user is also able to add images and those are also stored on the device. The database and images are stored in the apps documents folder. The database is set up with four tables, one of them containing a list of selectable items so the information in that table is constant. The other three are read/write to the user. The database also contains a field, which contains true/false as to whether the app has been purchased or not. My thought behind was that this would make the users data private and secure. My apps are set up using UIKit so SwiftData is not an option unless I rewrite the entire app in SwiftUI. Or is there a good way to use SwiftData in UIKit? Is there a way to store/move this information into the cloud so that the data can be synced across multiple devices? Or maybe set up an import/export scenario using a CSV file for the database using Dropbox? Any help or advice would be appreciated. Thanks in advance.
0
0
476
Feb ’24
App running on iOS 17 creates different PDF data from on iOS 16 and earlier
Hello, I have a question about PDF data creation on iOS 17. My app creates PDF data from HTML for printing, and it is not possible to print out the PDF data to a particular printer when the app runs on iOS 17, despite that it works fine on iOS 16 and earlier. The cause of the printing problem is unclear, however, I found that the contents of PDF data are different between iOS 17 and iOS 16 in the following 4 points: PDF version iOS 17: Ver. 1.4 iOS 16: Ver. 1.3 Size of PDF data iOS 17: 100KB iOS 16: 505KB Embedded font iOS 17: HiraginoSans-W5 iOS 16: HiraginoSans-W3 Displayed text size iOS 17: just a little bigger than 14pt iOS 16: 14pt I am hoping that the printing problem can be resolved if my app running on iOS 17 creates the same PDF data as on iOS 16, so my question is: Is there any way to create the same format of PDF data as iOS 16 or earlier when an app is running on iOS 17, especially to create data in version 1.3 of PDF? In my app, I use almost the same as the following code to create PDF data from HTML, and I couldn't find any option to specify a version of PDF for UIPrintPageRenderer, UIMarkupTextPrintFormatter and UIGraphicsPDFContext classes... Any info would be appreciated. Thanks, let htmlString = """ <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=420,height=595, shrink-to-fit=yes" /> <style type="text/css"> * { box-sizing: border-box; font-family: 'Hiragino Mincho ProN', serif; font-size: 1em; line-height: 1; } body { margin: 0; padding: 0; font-size: 14pt; } span.gothic { font-size: 3.5em; font-family: "Helvetica Neue", Helvetica, "Hiragino Sans", sans-serif; } </style> </head> <body> 明朝体のテキスト <span class="gothic">ゴシック体のテキスト</span> </body> </html> """ let render = UIPrintPageRenderer() let paperRect = CGRect(x: 0, y: 0, width: 420.0, height: 595) // A5, 72 dpi render.setValue(paperRect, forKey: "paperRect") let contentsRect = CGRect(x: 0, y: 0, width: 420.0, height: 595) // A5, 72 dpi render.setValue(contentsRect, forKey: "printableRect") let fmt = UIMarkupTextPrintFormatter(markupText: htmlString) render.addPrintFormatter(fmt, startingAtPageAt: 0) let pdfData = NSMutableData() UIGraphicsBeginPDFContextToData(pdfData, paperRect, nil) render.prepare(forDrawingPages: NSMakeRange(0, render.numberOfPages)) let bound = UIGraphicsGetPDFContextBounds() for i in 0..<render.numberOfPages { UIGraphicsBeginPDFPage() render.drawPage(at: i, in: bound) } UIGraphicsEndPDFContext() do { let url = URL(fileURLWithPath:"test.pdf") try pdfData.write(to: url) print("Done") } catch { print("Failed to save", error) }
0
0
537
Feb ’24
Sizing DTAttributedTextContentView based on its attributedString
I am trying to self size DTAttributedTextContentView inside the collection cell based on its attributed text. The problem I face is that when I set attributedTextContentView width constraints like so: attributedTextContentView.widthAnchor.constraint(lessThanOrEqualToConstant: 260) it applies the whole constant width (in this case 260) to the textContentView, even if attributedString length is smaller than the width, leaving some extra space: My question is, how to size the frame of DTAttributedTextContentView so that it just encloses the text that it contains? Initially I used basic UITextView, but the scrolling of cells through collection view is not that smooth when there are multiple cells, and also it gives possibility to easy access the last line of the text inside, which I need for my app, so I would like to stick to DTAttributedTextContentView. Here is the sample code for testing: class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() configureCollectionView() } // MARK: - Collection view setup let collectionView: UICollectionView = { let layout = UICollectionViewCompositionalLayout { (section, environment) -> NSCollectionLayoutSection? in let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(10)) let item = NSCollectionLayoutItem(layoutSize: itemSize) let group = NSCollectionLayoutGroup.vertical(layoutSize: itemSize, subitems: [item]) let section = NSCollectionLayoutSection(group: group) section.interGroupSpacing = 5 return section } layout.configuration.scrollDirection = .vertical let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) collectionView.register(ConversationCollectionViewCell.self, forCellWithReuseIdentifier: "ConversationCell") return collectionView }() private func configureCollectionView() { collectionView.dataSource = self collectionView.backgroundColor = .brown view.addSubview(collectionView) collectionView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor), collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor), collectionView.topAnchor.constraint(equalTo: view.topAnchor), collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor) ]) } } // MARK: - Collection Data Source extension ViewController: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 10 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ConversationCell", for: indexPath) as! ConversationCollectionViewCell return cell } } // MARK: - Collection View Custon Cell final class ConversationCollectionViewCell: UICollectionViewCell, DTAttributedTextContentViewDelegate { var mainCellContainerView = UIView() var attributedTextContentView = DTAttributedTextContentView() //MARK: - LIFECYCLE override init(frame: CGRect) { super.init(frame: frame) setupmainCellContainerView() setupAttributedTextContentView() layoutIfNeeded() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } // MARK: - UI STEUP private func setupmainCellContainerView() { contentView.addSubview(mainCellContainerView) mainCellContainerView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ mainCellContainerView.topAnchor.constraint(equalTo: contentView.topAnchor), mainCellContainerView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), mainCellContainerView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), mainCellContainerView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), ]) } private func setupAttributedTextContentView() { mainCellContainerView.addSubview(attributedTextContentView) attributedTextContentView.backgroundColor = .systemIndigo attributedTextContentView.delegate = self attributedTextContentView.sizeToFit() let attributedString = NSAttributedString(string: "Simple message for testing purpose @", attributes: [ .font: UIFont(name: "HelveticaNeue", size: 17), .foregroundColor: UIColor.white, .paragraphStyle: { let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = .left paragraphStyle.lineBreakMode = .byWordWrapping return paragraphStyle }() ]) attributedTextContentView.attributedString = attributedString attributedTextContentView.contentMode = .redraw attributedTextContentView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ attributedTextContentView.widthAnchor.constraint(lessThanOrEqualToConstant: 260), attributedTextContentView.topAnchor.constraint(equalTo: mainCellContainerView.topAnchor), attributedTextContentView.bottomAnchor.constraint(equalTo: mainCellContainerView.bottomAnchor), ]) } }
1
0
520
Feb ’24
Error Domain=NSCocoaErrorDomain Code=257
Hello, I have created a documentspicker to select a PDF file and then upload it to storage, but I am getting this error only on my device; it works correctly on the simulator. This is my code: @Binding var alertShow:Bool var detailpet:String = "" func makeCoordinator() -> Coordinator { return DocumentPicker.Coordinator(parent1: self) } func makeUIViewController(context: UIViewControllerRepresentableContext<DocumentPicker>) -> UIDocumentPickerViewController { let picker = UIDocumentPickerViewController(forOpeningContentTypes: [.pdf]) picker.allowsMultipleSelection = false picker.delegate = context.coordinator return picker } func updateUIViewController(_ uiViewController: UIDocumentPickerViewController, context: UIViewControllerRepresentableContext<DocumentPicker>) { } class Coordinator : NSObject, UIDocumentPickerDelegate { var parent:DocumentPicker init(parent1: DocumentPicker){ parent = parent1 } func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls:[URL]) { let bucket = Storage.storage().reference() let db = Firestore.firestore() let collection = "documents" guard let url = urls.first, url.startAccessingSecurityScopedResource() else { return } DispatchQueue.main.async { url.stopAccessingSecurityScopedResource() print("Documents Picker stop") } let referenceDocument = bucket.child("docu/\(url.deletingPathExtension().lastPathComponent)") let _ = referenceDocument.putFile(from:url, metadata: nil) { metadata , error in guard metadata != nil else{ print("Error \(String(describing: error?.localizedDescription))") return } referenceDocument.downloadURL { url, error in guard let url = url else { print("Message error \(String(describing: error?.localizedDescription))") return } let _ = try? db.collection(collection).addDocument(from:DocumentData(idpet:self.parent.detailpet, name: "\(url.deletingPathExtension().lastPathComponent).pdf", url: url.absoluteString)) } print("Succes") self.parent.alertShow.toggle() } } } } t seems to be a permissions issue, I believe. Do you know how I can fix this? It's my first application. Thank you.
1
0
424
Feb ’24
[iOS12.5] UITabBarItem selectedImage not working
Hi everyone, I'm having issue with UITabBarItem's selectedImage is not working only on iOS 12. Image is in PNG format, already tried with PDF single scale but result still the same. let vc = HomeViewController.storyboardInstance() let tabBarItem = UITabBarItem(title: "home".localized(), image: UIImage(named: "tabbar.home.selected"), selectedImage: UIImage(named: "tabbar.home.selected")) tabBarItem.updateFont() vc.tabBarItem = tabBarItem return CustomNavigationController(rootViewController: vc) I also want to mention that image is working fine with original color (render as Original Image) but selectedImage (render as Original Image) with original color doesn't work. Does anyone here know what is the problem ?
0
0
296
Feb ’24
Voice Over in UITableViewCell with child view controllers
The structure of the UI is a bit complicated. I'll do my best to explain. There is a UITableView that has a sibling in its view hierarchy. Footer buttons that come on top of the UITableView at the bottom of the screen. I am using a one finger swipe gesture to iterate over different elements on the page and in the table view. Each cell in the UITableView has a UIViewController which has a UICollectionView. This UICollectionView has cells that have multiple views nested inside with most of them being dummy views. The cells have different structures and the voice over works well across them without any customisation and is able to identify all the right accessibility elements. Now the problem comes in the last cell on the page. Imagine it has 2 UILabels and 2 UIButtons. When navigating using normal voice over and not defining any accessibilityElements, the order is weird so I added override var accessibilityElements: [Any]?{ get{ return [label1, button1, label2, button2] }set {} When navigating to this cell, everything works fine but once an element inside this particular last cell is highlighted it gets messed up. The order works fine but the voice over ends up looping inside the cell. It doesn't go back to the other cells or navigate to the footer of the page. If I remove the accessibilityElements array then everything is fine but not in the correct order. Anybody know why that might be and how to break the loop? It would be helpful if I could know how voice over recognises which view to navigate to next.
1
0
714
Feb ’24
iOS 17 Crash
We are noticing below iOS crash majorly happening from iOS 17 version. Can someone please check and let me know what might be causing this crash and how to solve this? Attached full crash report from app store. Last Exception Backtrace: 0 CoreFoundation 0x1b5cce69c __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x1adf67c80 objc_exception_throw + 60 (objc-exception.mm:356) 2 UIKitCore 0x1b8592ab4 -[UIViewController _presentViewController:withAnimationController:completion:] + 4236 (UIViewController.m:0) 3 UIKitCore 0x1b859312c __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 92 (UIViewController.m:9730) 4 UIKitCore 0x1b7f36fac -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 128 (UIViewControllerTransitioning.m:1205) 5 UIKitCore 0x1b7f36ab4 -[_UIViewControllerTransitionContext _runAlongsideCompletions] + 140 (UIViewControllerTransitioning.m:393) 6 UIKitCore 0x1b7f36144 -[_UIViewControllerTransitionContext completeTransition:] + 128 (UIViewControllerTransitioning.m:307) 7 UIKitCore 0x1b80a9460 -[UITransitionView notifyDidCompleteTransition:] + 180 (UITransitionView.m:280) 8 UIKitCore 0x1b80a9118 -[UITransitionView _didCompleteTransition:] + 832 (UITransitionView.m:249) 9 UIKitCore 0x1b7e91d78 UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK + 36 (UIView.m:16376) 10 UIKitCore 0x1b7e91510 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 624 (UIView.m:16409) 11 UIKitCore 0x1b7e90b88 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 436 (UIView.m:0) 12 UIKitCore 0x1b7e72d84 -[UIViewAnimationState animationDidStop:finished:] + 196 (UIView.m:2407) 13 UIKitCore 0x1b7e72e98 -[UIViewAnimationState animationDidStop:finished:] + 472 (UIView.m:2426) 14 QuartzCore 0x1b725f980 run_animation_callbacks(void*) + 132 (CALayer.mm:7713) 15 libdispatch.dylib 0x1bdbd9300 _dispatch_client_callout + 20 (object.m:561) 16 libdispatch.dylib 0x1bdbe7998 _dispatch_main_queue_drain + 984 (queue.c:7813) 17 libdispatch.dylib 0x1bdbe75b0 _dispatch_main_queue_callback_4CF + 44 (queue.c:7973) 18 CoreFoundation 0x1b5c1901c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1780) 19 CoreFoundation 0x1b5c15d28 __CFRunLoopRun + 1996 (CFRunLoop.c:3149) 20 CoreFoundation 0x1b5c15478 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 21 GraphicsServices 0x1f91964f8 GSEventRunModal + 164 (GSEvent.c:2196) 22 UIKitCore 0x1b803962c -[UIApplication _run] + 888 (UIApplication.m:3685) 23 UIKitCore 0x1b8038c68 UIApplicationMain + 340 (UIApplication.m:5270) 24 UnityFramework 0x11151c310 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92 (main.mm:124) 25 myapp 0x10497c17c main + 60 (main.mm:26) 26 dyld 0x1d894edcc start + 2240 (dyldMain.cpp:1269) 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 libsystem_kernel.dylib 0x00000001fd349fbc __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x000000021fc0b680 pthread_kill + 268 (pthread.c:1681) 2 libsystem_c.dylib 0x00000001bdc91c24 __abort + 136 (abort.c:159) 3 libsystem_c.dylib 0x00000001bdc91b9c abort + 192 (abort.c:126) 4 libc++abi.dylib 0x000000021fb35ff8 abort_message + 132 (abort_message.cpp:78) 5 libc++abi.dylib 0x000000021fb25f90 demangling_terminate_handler() + 348 (cxa_default_handlers.cpp:77) 6 libobjc.A.dylib 0x00000001adf6ada4 _objc_terminate() + 144 (objc-exception.mm:496) 7 UnityFramework 0x000000011358d254 CPPExceptionTerminate() + 332 (BSG_KSCrashSentry_CPPException.mm:137) 8 libc++abi.dylib 0x000000021fb353bc std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59) 9 libc++abi.dylib 0x000000021fb35360 std::terminate() + 108 (cxa_handlers.cpp:88) 10 libdispatch.dylib 0x00000001bdbd9314 _dispatch_client_callout + 40 (object.m:564) 11 libdispatch.dylib 0x00000001bdbe7998 _dispatch_main_queue_drain + 984 (queue.c:7813) 12 libdispatch.dylib 0x00000001bdbe75b0 _dispatch_main_queue_callback_4CF + 44 (queue.c:7973) 13 CoreFoundation 0x00000001b5c1901c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1780) 14 CoreFoundation 0x00000001b5c15d28 __CFRunLoopRun + 1996 (CFRunLoop.c:3149) 15 CoreFoundation 0x00000001b5c15478 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 16 GraphicsServices 0x00000001f91964f8 GSEventRunModal + 164 (GSEvent.c:2196) 17 UIKitCore 0x00000001b803962c -[UIApplication _run] + 888 (UIApplication.m:3685) 18 UIKitCore 0x00000001b8038c68 UIApplicationMain + 340 (UIApplication.m:5270) 19 UnityFramework 0x000000011151c310 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92 (main.mm:124) 20 myapp 0x000000010497c17c main + 60 (main.mm:26) 21 dyld 0x00000001d894edcc start + 2240 (dyldMain.cpp:1269) NSInvalidArgumentException.txt
0
0
1k
Feb ’24
Scrolling with Full Keyboard Access
I'm testing Full Keyboard Access in my app and on the iPhone apps in my iPhone 12 mini with OS 17. My work will directly impact how much accessibility review is done on our iOS app which has millions of unique views a month. In several Apple apps I cannot seem to scroll down through the screen when the main View has focus. For example, the Home app does not scroll with arrow keys nor Ctrl+tab through any of the 6 main content groups on the Discover screen. it almost appears it's a single static image; the "Getting Started" button is not able to be activated. I can activate sections further down when I enable gestures, but cannot pinpoint a specific location. The Stocks app includes Top Stories from the Apple News app; in either app I can select a story, which brings up the article on full screen, but then I cannot use the arrow keys or Ctrl+tab to read the article or interact with inline links. Ctrl + tab selects the button features like to watch an embedded video or live coverage, then jumps down to the end of the article to focus on Related stories, ignoring all the links in between. I am able to somewhat move through the article text with keyboard gestures, but many of these articles have embedded links or content after the article (before "Related Stories" I work in digital accessibility and need to be able to tell my teams what is expected behavior and where to see examples of this. If Apple can't demonstrate Full Keyboard Access in its own apps this is a problem. Our own app has some of these issues but I am unsure how to recommend a solution when the scrollview seems to not work in native iOS apps by Apple.
1
2
1.1k
Feb ’24
Full keyboard access UI elements
Hello, Since the full keyboard access Help menu is a little vague on the nuances between Tab, arrow keys, and Ctrl+tab in terms of navigation, could you point me to where I can find the intended mapping of FKA keys to UI elements? For example, I have been in several Apple iOS apps where the UITabBar at the bottom is navigable with any of the three options mentioned above. In other contexts, the tab key only moves the user to the tab bar section, then the icons are focusable with arrow or Ctrl + tab. When a modal pops up stating I will be leaving an app, should the choices be navigable with Tab? Ctrl+tab? or arrows too? In other places, like news articles in Apple News, it seems that I cannot scroll with the arrow keys to read the various paragraphs, nor interact with links at all that are in the article. If there is a separate keyboard shortcut for links or scrollbar, please update the Help menu. It seems pretty straightforward that arrow keys navigate between HStacks and VStacks. Is that an accurate guess of arrow key behavior? I feel like I'm guessing in several places within the content groups.
4
0
1.5k
Feb ’24