-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on iPad for iOS 15 #35
Comments
@chamitha I faced the same problem, please try using |
Thanks @JAGUAR108 but I need the vertical alignment to be top. |
I changed the following method to return at least 1 layout attribute, and it looks like it's working.
|
working.... 💯 🔥 |
I'm getting a crash force unwrapping a nil value testing on iOS 15 Beta but on iPad only. iPhone seems to work fine. The crash occurs here
the cause being on iPad
super.layoutAttributesForElements
called bylayoutAttributes(forItemsInLineWith: currentLayoutAttributes)
returns nil (and therefore an empty array) whereas on iPhone this returns the layout attributes of the cell. TheverticalAlignmentAxisForLine
func returns nil if the attributes array is empty therefore causing the force unwrap to crash.Whilst this issue might be fixed in a subsequent beta release I think it exposes a valid issue with the force unwrap. Perhaps a default alignment should be returned by
verticalAlignmentAxisForLine
instead of nil?The text was updated successfully, but these errors were encountered: