-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 macOS Catalyst while collapsing any InlineRow #2023
Labels
catalyst
macOS Catalyst issues
Comments
+1 |
@jurex Could you solve this issue or at least some kind of workaround? |
nope, the only workaround I found for now is to not use any inline rows in catalyst. |
Same problem on macOS Catalina 10.15.3 |
I found this works around it for now. This doesn't seem like the right solution but it works around this problem in a brute force type of way. Edit Core.swift: open func rowsHaveBeenAdded(_ rows: [BaseRow], at indexes: [IndexPath]) {
guard animateTableView else { return }
// Picker InlineRow rows will crash on close with Eureka when running on the mac.
#if targetEnvironment(macCatalyst)
for row in rows {
if row is BaseInlineRowType || row is _DatePickerRow || row.baseCell is UIPickerViewDataSource {
tableView?.reloadData()
return
}
}
#endif
tableView?.beginUpdates()
tableView?.insertRows(at: indexes, with: insertAnimation(forRows: rows))
tableView?.endUpdates()
}
open func rowsHaveBeenRemoved(_ rows: [BaseRow], at indexes: [IndexPath]) {
guard animateTableView else { return }
// Picker InlineRow rows will crash on close with Eureka when running on the mac.
#if targetEnvironment(macCatalyst)
for row in rows {
if row is BaseInlineRowType || row is _DatePickerRow || row.baseCell is UIPickerViewDataSource {
tableView?.reloadData()
return
}
}
#endif
tableView?.beginUpdates()
tableView?.deleteRows(at: indexes, with: deleteAnimation(forRows: rows))
tableView?.endUpdates()
} |
+1 |
Does the workaround in #2103 work for you? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Eureka v5.2.1
Xcode 11.4.1
macOS Catalina 10.15.4
MacBook Pro 13-inch, 2018
It's working fine on iOS, but it's crashing on macOS using Catalyst.
Out of bounds exceptions when trying to collapse any inline row (i.e. DateInlineRow, ...)
Thread 1: Fatal error: Section: Index out of bounds
/Pods/Eureka/Source/Core/Section.swift, line 247
The text was updated successfully, but these errors were encountered: