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

UIScrollView 看不到 ScrollBars/Indicators.

UIScrollView cannot see ScrollBars/Indicators.(UIScrollView 看不到 ScrollBars/Indicators.)
本文介紹了UIScrollView 看不到 ScrollBars/Indicators.的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我以編程方式創建了一個 UISCrollView,但我看不到滾動條/指示器.

I programatically created a UISCrollView but i cant see the scrollbars/indicators.

UIScrollView * contentScrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(760, 70, 205, 320)];
contentScrollView.delegate = self;
contentScrollView.scrollEnabled = YES;
contentScrollView.pagingEnabled = YES;
contentScrollView.userInteractionEnabled=YES;
contentScrollView.scrollsToTop = YES;
contentScrollView.showsVerticalScrollIndicator = NO;
contentScrollView.showsVerticalScrollIndicator = YES;
contentScrollView.alwaysBounceVertical = NO;
contentScrollView.alwaysBounceHorizontal = NO;
contentScrollView.bounces = NO;
contentScrollView.hidden = NO;
[contentScrollView flashScrollIndicators];
UILabel *titleLable = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 205, 40)];
UILabel *subtitleLable = [[UILabel alloc] initWithFrame:CGRectMake(10, 60, 205, 50)];
UITextView * mainContent = [[UITextView alloc]initWithFrame:CGRectMake(10, 110, 205, 230)];

[titleLable setText:@"...."];
[subtitleLable setText:@"SUbtitle"];
[mainContent setText:@"Descritpon"];
[contentScrollView addSubview:mainContent];
[contentScrollView addSubview:titleLable];
[contentScrollView addSubview:subtitleLable];

我將這段代碼添加到一個視圖中,該視圖再次附加到另一個更大的滾動視圖.有誰知道為什么會這樣?同樣為簡單起見,我將每個標簽包含的文本減少為單詞,但在程序中我的文本足以滾動

This code i add it to a view which is again attached to another bigger scrollview.. Does anyone know why this is the case? Also for simplicity i have reduced the text each lable contains to words but in the program i have the text is sufficient to scroll

謝謝..

推薦答案

要讓滾動視圖滾動,滾動視圖的內容大小必須大于其邊界.請添加此行然后檢查:

For the scroll view to scroll, the content size for the scroll view must be greater than its bounds. Please add this line and then check:

contentScrollView.contentSize=CGSizeMake(320, 250);

并將 contentScrollView.bounces 設置為 YES 并刪除 contentScrollView.showsVerticalScrollIndicator=YES 行,因為您首先將值設置為NO 然后 YES.

and also set the contentScrollView.bounces to YES and remove the line contentScrollView.showsVerticalScrollIndicator=YES as you have first set the value to NO and then YES.

這應該可以完成工作.

這篇關于UIScrollView 看不到 ScrollBars/Indicators.的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Stop a UITableView from automatically scrolling(阻止 UITableView 自動滾動)
iOS UIScrollView Lazy Loading(iOS UIScrollView 延遲加載)
using iOS 6.0 SDK and building for iOS 5 Target causes UIScrollView setMinimumZoomScale to fail when running on iOS 5 simulator(在 iOS 5 模擬器上運行時,使用 iOS 6.0 SDK 并為 iOS 5 Target 構建會導致 UIScrollView setMinimumZ
Create partial-screen UIPageViewController programmatically(以編程方式創建部分屏幕 UIPageViewController)
how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
UIImageView zoom and pinch in UIScrollView(UIImageView 在 UIScrollView 中縮放和捏合)
主站蜘蛛池模板: 91中文字幕在线 | 亚洲成人精品一区 | 亚洲日韩中文字幕一区 | 日本免费一区二区三区 | 午夜视频在线观看网址 | 国产精品久久久久久久久免费软件 | 99热首页 | 中文字幕久久精品 | 国产精品成av人在线视午夜片 | 久久精品国产久精国产 | 国产精品久久久久久久久久免费看 | 久久久片| 久久久久久久久久久久久久国产 | 一区精品视频 | 欧美一区二区大片 | www.一区二区 | 日韩久久综合网 | 密室大逃脱第六季大神版在线观看 | 国产伦精品一区二区三区在线 | 97超碰在线播放 | 国产精品99一区二区 | 国产成人精品午夜 | 韩日一区二区三区 | 日韩一区在线播放 | 国产成人精品午夜 | 在线成人| 91在线最新 | 久久精品亚洲国产奇米99 | 欧美成人影院在线 | 精品国产区 | 精品国产乱码久久久久久蜜柚 | 日韩不卡一区二区 | 国产精品久久久久婷婷二区次 | 久久久久久久国产 | 久操亚洲 | 69热视频在线观看 | 久久免费精品 | 国产精品成人一区二区 | 在线成人 | 91久久爽久久爽爽久久片 | 欧美日韩中文国产一区发布 |