Skip to content

getCurrentIndex 方法 在阿语环境下就 无法实现了 #36

@blockshark

Description

@blockshark

正确的写法应该是这样
private func getCurrentIndex() -> Int {
let point = self.convert(collectionView.center, to: self.collectionView)
let indexPath = self.collectionView.indexPathForItem(at: point)
return indexPath?.item ?? 0
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions