How to full scrolling TableView CollectionView in swift
Create Top object
like:-
@IBOutlet weak var cosStoryCollectionViewTop: NSLayoutConstraint!
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let yOffset: CGFloat = scrollView.contentOffset.y
if yOffset > 0 {
self.cosStoryCollectionViewTop.constant = -yOffset
}
if yOffset < 1 {
self.cosStoryCollectionViewTop.constant = -20
}
}
Comments
Post a Comment