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
正确的写法应该是这样
private func getCurrentIndex() -> Int {
let point = self.convert(collectionView.center, to: self.collectionView)
let indexPath = self.collectionView.indexPathForItem(at: point)
return indexPath?.item ?? 0
}
The text was updated successfully, but these errors were encountered:
正确的写法应该是这样
private func getCurrentIndex() -> Int {
let point = self.convert(collectionView.center, to: self.collectionView)
let indexPath = self.collectionView.indexPathForItem(at: point)
return indexPath?.item ?? 0
}
The text was updated successfully, but these errors were encountered: