久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

UIScrollView 不顯示滾動指示器

UIScrollView not showing scroll indicator(UIScrollView 不顯示滾動指示器)
本文介紹了UIScrollView 不顯示滾動指示器的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個 UIScrollView,我使用它動態創建和調整大小...

I have a UIScrollView which I create and size dynamically using...

scrollView.contentSize = CGSizeMake(scrollView.frame.size.width , length);

然后我將 subviews 添加到 UIScrollView.我確實有 scrollView.showsVerticalScrollIndicator = YES;

I then add subviews to the UIScrollView. I do have scrollView.showsVerticalScrollIndicator = YES;

滾動時滾動指示器永遠不會出現.

When scrolling the scroll indicator never appears.

即使我調用 [scrollView flashScrollIndicators] 也沒有任何反應.

Even if I call [scrollView flashScrollIndicators] nothing happens.

想法?

推薦答案

遇到了同樣的問題,找不到原因.最后一個答案給出了最后的提示:每當我添加新的子視圖時,我首先從滾動視圖中刪除所有現有的子視圖(顯然還有滾動指示器).

Had the same problem and couldn't find the cause. The last answer gave the final hint: whenever I added new subviews I first removed all existing subviews from the scrollview (and apparently also the scroll indicators).

檢查我的循環后,如果子視圖確實是我想要刪除的那種,滾動指示器就會出現:

After checking in my loop, if the subview really was of the kind I wanted to be removed the scroll indicators showed up:

for (NSObject * subview in [[[scrollView subviews] copy] autorelease]) {
    if ([subview isKindOfClass:[MySubView class]]) {
       [(MySubView*)subview removeFromSuperview];
    }
}   

更新:將代碼更改為 Nikolai 的建議

Update: changed code to Nikolai's suggestion

這篇關于UIScrollView 不顯示滾動指示器的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

UIButtons at the bottom of UIScrollView not working(UIScrollView 底部的 UIButtons 不起作用)
scrollViewWillEndDragging:withVelocity:targetContentOffset: not working on the edges of a UISCrollView(scrollViewWillEndDragging:withVelocity:targetContentOffset: 不在 UISCrollView 的邊緣工作) - IT屋-程序員軟件開發技術分享社
ImageView Scaling when scrolling down(向下滾動時 ImageView 縮放)
Bounds automatically changes on UIScrollView with content insets(UIScrollView 上的邊界自動更改,帶有內容插圖)
iOS5 UITapRecognizer for UIScrollView interfering with buttons. How to fix?(用于 UIScrollView 的 iOS5 UITapRecognizer 干擾按鈕.怎么修?)
How to Cancel Scrolling in UIScrollView(如何在 UIScrollView 中取消滾動)
主站蜘蛛池模板: 久久99视频精品 | 九九99靖品 | 浮生影院免费观看中文版 | 一区二区三区四区在线视频 | 午夜精品一区二区三区在线 | 国产免费va | 午夜影院| 四虎影院久久 | 久久九九免费 | 97免费在线观看视频 | 欧美精品久久久久 | 久久一二区 | 久久久久香蕉视频 | 国产亚洲精品综合一区 | 福利精品 | 毛片免费在线 | 性一爱一乱一交一视频 | 日韩中文字幕一区二区 | 一区二区三区在线免费观看视频 | 欧美中文字幕在线观看 | 久操av在线 | 欧美精品1区2区3区 精品国产欧美一区二区 | 在线免费观看黄a | 亚洲人成人一区二区在线观看 | 中文字幕免费视频 | 欧美久久精品 | 欧美激情精品久久久久久 | 亚洲成人一区二区 | 男女羞羞网站 | 欧美成视频 | 久久天堂网 | 91文字幕巨乱亚洲香蕉 | 日韩成人在线观看 | 国产三级精品三级在线观看四季网 | 黄色一级大片在线免费看产 | 久久久久精 | 一区二区三区高清在线观看 | 特黄视频 | 二区亚洲| 美女一级黄 | 一级a爱片久久毛片 |