Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS : ScrollView delegate method inside of CollectionView not call

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.

like image 854
vipinsaini0 Avatar asked Mar 10 '16 13:03

vipinsaini0


1 Answers

Just do simple

add below line in .m file

yourCollectionView.delegate = self;

and below add in .h

UICollectionViewDelegate

remove

UIScrollViewDelegate
like image 91
Dheeraj Kumar Avatar answered Nov 18 '22 11:11

Dheeraj Kumar