本文介紹了scrollViewDidScroll 從未調用過的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我在視圖中有一個滾動視圖.我想使用函數 scrollViewDidScroll 來檢查和更新箭頭(左右).
I have a Scrollview within View. I want to use the function scrollViewDidScroll to check and update the arrows (left right).
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
NSLog(@"Did scroll");
[self updateButtons];
}
當我向左或向右滾動時,似乎不會調用 scrollViewDidScroll.我搜索了所有內容,但沒有找到解決方案.
It seems scrollViewDidScroll won't be called when I scroll left or right. I searched everything but didn't found a solution.
希望有人有解決方案.
推薦答案
典型的錯誤是沒有簡單地設置視圖的委托".你可能忘記的是
The typical error is that "one does not simply set the delegate of a view". What you have probably forgotten is
theScrollView.delegate = self;
這篇關于scrollViewDidScroll 從未調用過的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!