swift collectionview scrolltoitem
self.collectionView.scrollToItem(at:IndexPath(item: indexNumber, section: sectionNumber), at: .right, animated: false)
swift collectionview scrolltoitem
self.collectionView.scrollToItem(at:IndexPath(item: indexNumber, section: sectionNumber), at: .right, animated: false)
swift paged scrollview get current page
// Swift 5
self.scrollView.delegate = self
// Changed the page property when the user scrolls over 50% of the current page.
// Page starts with 0
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let scrollViewWidth = scrollView.bounds.width
self.page = Int(round(scrollView.contentOffset.x / scrollViewWidth))
}
var page: Int {
didSet {
guard oldValue != self.page else {
return
}
// Handle page update
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us