I have UICollectionView
with horizontal scrolling and paging. When I scroll to next or previous page for the first time or change scrolling direction from left to right, value of indexPath.row in cellForItemAtIndexPath
is changing by 3 not 1. Then it works properly. CollectionView
works without problems in iOS
9. The problem occurs just in iOS
10. Thanks.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- SwiftUI: UIImage (QRCode) does not load after call
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Using if let syntax in switch statement
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Enum with associated value conforming to CaseItera
- Swift - hide pickerView after value selected
- Is there a Github markdown language identifier for
Problem was with new prefetching feature of UICollectionView. Disabling of prefetching solved my problem.
Possible Case:
Since you're using paging in your collectionView, and as your declaration, 1 page contains 3 cells. So if you move 1 page, the index of cell will move by 3 because the index the taking from the cell at the left.
E.g. Cell > Page 1:[0..1..2] Page 2:[3..4..5]