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

UIScrollView 看不到 ScrollBars/Indicators.

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

問題描述

我以編程方式創(chuàng)建了一個(gè) UISCrollView,但我看不到滾動(dòng)條/指示器.

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];

我將這段代碼添加到一個(gè)視圖中,該視圖再次附加到另一個(gè)更大的滾動(dòng)視圖.有誰知道為什么會(huì)這樣?同樣為簡(jiǎn)單起見,我將每個(gè)標(biāo)簽包含的文本減少為單詞,但在程序中我的文本足以滾動(dòng)

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

謝謝..

推薦答案

要讓滾動(dòng)視圖滾動(dòng),滾動(dòng)視圖的內(nèi)容大小必須大于其邊界.請(qǐng)?zhí)砑哟诵腥缓髾z查:

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 設(shè)置為 YES 并刪除 contentScrollView.showsVerticalScrollIndicator=YES 行,因?yàn)槟紫葘⒅翟O(shè)置為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.

這應(yīng)該可以完成工作.

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

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

相關(guān)文檔推薦

Stop a UITableView from automatically scrolling(阻止 UITableView 自動(dòng)滾動(dòng))
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 模擬器上運(yùn)行時(shí),使用 iOS 6.0 SDK 并為 iOS 5 Target 構(gòu)建會(huì)導(dǎo)致 UIScrollView setMinimumZ
Create partial-screen UIPageViewController programmatically(以編程方式創(chuàng)建部分屏幕 UIPageViewController)
how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
UIImageView zoom and pinch in UIScrollView(UIImageView 在 UIScrollView 中縮放和捏合)
主站蜘蛛池模板: 亚洲电影第三页 | 亚洲欧美日韩电影 | 国产精品一区二区三区在线 | 夜夜骑天天干 | 亚洲天堂免费 | 日韩精品1区2区3区 成人黄页在线观看 | 二区欧美 | 欧洲一级黄 | 天堂综合 | 奇米视频777 | 免费永久av | 国外成人在线视频网站 | 免费国产网站 | 精品一区二区三区在线观看 | a级在线 | 久久免费视频1 | 美女视频一区二区三区 | 亚洲精品视 | 成人免费视频一区 | 91亚洲国产成人久久精品网站 | 美女天堂在线 | 国产精品视频专区 | 天天操夜夜操 | 91麻豆蜜桃一区二区三区 | 91久久久精品国产一区二区蜜臀 | 国产精品.xx视频.xxtv | 午夜影院| 欧美精品一区二区三区蜜桃视频 | 天天干天天玩天天操 | 欧美一区二区三区四区五区无卡码 | 国产精品久久久久久妇女6080 | 一区二区三区免费在线观看 | 亚洲精品久久久久久久久久久久久 | 久久国产传媒 | a级免费视频 | 国产精品自产av一区二区三区 | 久久久www成人免费精品 | 欧美一区二区在线播放 | 久久久久国产一区二区三区 | 国产日韩精品久久 | 国产成人91视频 |