iOS : ScrollView delegate method inside of CollectionView not call
11,642
Just do simple
add below line in .m
file
yourCollectionView.delegate = self;
and below add in .h
UICollectionViewDelegate
remove
UIScrollViewDelegate
![vipinsaini0](https://i.stack.imgur.com/fWMkk.jpg?s=256&g=1)
Author by
vipinsaini0
I am primarily an iOS developer and 6.11 years of experience. Expertly-designed Apps, Attract and easy-to-use interface and use in daily routine. I worked on Apple SignIn, Socket, JSON-Parsing, Lottie-iOS, Audio-Video Calling and HTML games.
Updated on July 25, 2022Comments
-
vipinsaini0 almost 2 years
First I have set delegate in .h file
@interface ViewController : UIViewController<UICollectionViewDataSource, UIScrollViewDelegate>
After that just call this method in collection view .m file
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { NSLog(@"scrollViewDidScroll"); }
but not call this method.