Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

iphone - Become UIScrollViewDelegate delegate for UITableView

I have a UITableView instance variable. I want to be able to register my view controller to be the UIScrollViewDelegate for my UITableViewController. I have already tried

tableView.delegate = self;

But when scrolling, my methods

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView            
                  willDecelerate:(BOOL)decelerate

don't get called. Any suggestions?

question from:https://stackoverflow.com/questions/1615345/become-uiscrollviewdelegate-delegate-for-uitableview

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Now UITableViewDelegate conforms to UIScrollViewDelegate !

(I write this answer because many people are going to find this page googling..)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...