Skip to content
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

proposedNewDestinationRow() #48

Open
tuant2n opened this issue Mar 9, 2019 · 0 comments
Open

proposedNewDestinationRow() #48

tuant2n opened this issue Mar 9, 2019 · 0 comments

Comments

@tuant2n
Copy link

tuant2n commented Mar 9, 2019

Hi, I dont know why need to + 5pixel in here
`let visibleCells = tableView.visibleCells.filter {
// Workaround for an iOS 11 bug.

        // When adding a row using UITableView.insertRows(...), if the new
        // row's frame will be partially or fully outside the table view's
        // bounds, and the new row is not the first row in the table view,
        // it's inserted without animation.
        
        let cellOverlapsTopBounds = $0.frame.minY < tableView.bounds.minY **+ 5**
        let cellIsFirstCell = tableView.indexPath(for: $0) == IndexPath(row: 0, section: 0)
        
        return !cellOverlapsTopBounds || cellIsFirstCell
    }`

It creates a crash when I have 2 section, section 0 is empty, section 1 have 2 rows and visibleCells only have a cell at Index(1, 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant