Post

Replies

Boosts

Views

Activity

UICollectionViewRecursion when using estimated sizes in Compositional Layout
Hi everyone, our team was transferred a project that is using a "UICollectionViewCompositionalLayout" for displaying a large amount of data. On iOS 14 and below, we seemed to be having no problems. Now on iOS 15 however, we keep getting this debugger message: APPNAME[47924:507017] [UICollectionViewRecursion] cv == 0x7ff2af9d0200 Disabling recursion trigger logging We are also collecting crashes in our crash tool, solely from iOS 15 devices, saying: NSInternalInconsistencyException: UICollectionView (<UICollectionView 0x1122a6400>) is stuck in its update/layout loop. This can happen for many reasons, including self-sizing views whose preferred attributes are not returning a consistent size. To debug this issue, check the Console app for logs in the "UICollectionViewRecursion" category. We've found that setting all .estimated() sizes we're using in the section provider to .absolute() gets rid of the message, but of course the views aren't sized correctly then. We are using views that size themselves based on the content they display, using UIStackViews. We need them to be dynamic in height. Has something changed moving from iOS 14 to 15 about how the compositional layout has to be configured? Is there something we can do to further debug this issue? I've found some questions about this asked on StackOverflow, but none of them were answered either.
8
2
6.7k
Nov ’21
Text replacement popup appears while keyboard is animating, causing an offset
Hello everyone, we recently encountered an issue attempting to implement a text field in our SwiftUI app. We have the view setup so that the text field is at the bottom of the screen. Using SwiftUI's implicit keyboard avoidance, the textfield correctly moves up with the keyboard when the keyboard is shown. This is working fine, except for one edge case: Text replacement (or correction, I'm unsure about what this feature is called). If the user has entered a wrong word (it is underlined in red), then taps on that word, it is highlighted in red, and a popup with possible replacements is shown. If the user has the keyboard closed and then attempts to open text replacement for a word, the keyboard will move up, and the popup will show. However, it seems that the popup shows while the keyboard animation is still playing. This leads to the popup having an offset to the word it should be pointing to, see this screenshot: I have provided a minimal code example on GitHub, to reproduce this error. https://github.com/TomQDRS/text-replacement-benchmark-ios Is Apple aware of this? I can't imagine this being wanted behaviour. Has anyone encountered this issue and come up with a workaround? Is there a way to disable text replacement for a textview?
0
0
702
Nov ’22