You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2019. It is now read-only.
If you drag the B and drop left to the A, you'll get two A's. This problem occurs on demo and actual project.
// current:
func collectionView(_ collectionView: UICollectionView, at: IndexPath, didMoveTo toIndexPath: IndexPath) {
let book = books.remove(at: (toIndexPath as NSIndexPath).item)
books.insert(book, at: (toIndexPath as NSIndexPath).item)
}
// fixed: Is this the right solution ?
func collectionView(_ collectionView: UICollectionView, at: IndexPath, didMoveTo toIndexPath: IndexPath) {
let book = books.remove(at: (at as NSIndexPath).item)
books.insert(book, at: (toIndexPath as NSIndexPath).item)
}
The text was updated successfully, but these errors were encountered:
If you drag the B and drop left to the A, you'll get two A's. This problem occurs on demo and actual project.
The text was updated successfully, but these errors were encountered: