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

為什么UIScrollView在頂部留下空間并且不滾動(dòng)到底

Why is UIScrollView leaving space on top and does not scroll to the bottom(為什么UIScrollView在頂部留下空間并且不滾動(dòng)到底部)
本文介紹了為什么UIScrollView在頂部留下空間并且不滾動(dòng)到底部的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我是 Objective-C 編程的新手.

我正在使用帶有一些標(biāo)簽、圖像和文本視圖的 UIScrollView.

我已經(jīng)關(guān)閉了自動(dòng)布局,并且已經(jīng)嘗試開啟(標(biāo)題中描述的情況)和關(guān)閉(不滾動(dòng))調(diào)整滾動(dòng)視圖插圖".

這是我在 viewDidLoad 中插入的內(nèi)容:

 [scroller setScrollEnabled:YES];[滾輪 setContentSize:CGSizeMake(320, 687)];

但我一定遺漏了一些非常簡(jiǎn)單的東西.

解決方案

1...為什么UIScrollView在頂部留下空間

使用 Storyboard- 轉(zhuǎn)到視圖控制器 > 屬性檢查器 > 取消選中 Adjust Scroll View Insets 屬性

With Code- 額外空間設(shè)置viewController屬性automaticallyAdjustsScrollViewInsetsNO,默認(rèn)為.

self.automaticallyAdjustsScrollViewInsets = false;scroller.contentInset = UIEdgeInsetsZero;scroller.scrollIndicatorInsets = UIEdgeInsetsZero;scroller.contentOffset = CGPointMake(0.0, 0.0);

<塊引用>

2...不滾動(dòng)到底部

要使其滾動(dòng),請(qǐng)嘗試在 contentSize 中使用較大的數(shù)字,例如 CGSizeMake(320, 1687).如果它有效,則意味著您沒有將 contentSize 設(shè)置得足夠大以容納其所有內(nèi)容.

I am new to objective-C programming.

I am using UIScrollView with some labels, image and text view on it.

I have turned off Autolayout and already tried with "Adjust scroll View Insets" on (situation described in title) and off (doesn't scroll).

This is what I insert into viewDidLoad:

    [scroller setScrollEnabled:YES];
[scroller setContentSize:CGSizeMake(320, 687)];

But I must be missing something very simple.

解決方案

1... Why is UIScrollView leaving space on top

With Storyboard- Goto view controller > Attribute Inspector > Uncheck Adjust Scroll View Insets property

With Code- For extra space set viewController property automaticallyAdjustsScrollViewInsets to NO, by default it is YES.

self.automaticallyAdjustsScrollViewInsets = false; 
scroller.contentInset = UIEdgeInsetsZero;
scroller.scrollIndicatorInsets = UIEdgeInsetsZero;
scroller.contentOffset = CGPointMake(0.0, 0.0);

2... does not scroll to the bottom

To make it scroll try with large number in contentSize like CGSizeMake(320, 1687). If it works that means you are not setting the contentSize large enough to have all its content.

這篇關(guān)于為什么UIScrollView在頂部留下空間并且不滾動(dòng)到底部的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

How to subclass UIScrollView and make the delegate property private(如何繼承 UIScrollView 并使委托屬性私有)
Swift - how to get last taken 3 photos from photo library?(Swift - 如何從照片庫(kù)中獲取最后拍攝的 3 張照片?)
Setting contentOffset programmatically triggers scrollViewDidScroll(以編程方式設(shè)置 contentOffset 觸發(fā) scrollViewDidScroll)
Photos app-like gap between pages in UIScrollView with pagingEnabled(使用 pagingEnabled 的 UIScrollView 中頁(yè)面之間的照片應(yīng)用程序式間隙)
why UIScrollView is leaving space from top in ios 6 and ios 7(為什么 UIScrollView 在 ios 6 和 ios 7 中從頂部留下空間)
UIScrollView pauses NSTimer while scrolling(UIScrollView 在滾動(dòng)時(shí)暫停 NSTimer)
主站蜘蛛池模板: 欧美日韩亚洲一区二区 | 亚洲人成在线观看 | 一区二区三区免费观看 | 亚洲欧洲精品一区 | 欧美成人手机在线 | 精品小视频 | 国产精品一区二区在线观看 | 国产女人叫床高潮大片免费 | 亚洲一区二区三区四区五区午夜 | 亚洲福利在线观看 | 国产精品区一区二区三 | 免费特黄视频 | 国产最好的av国产大片 | 在线播放中文 | 亚洲精品片| 亚洲成人一区 | 伊人狼人影院 | 伊大人久久 | 国产aaaaav久久久一区二区 | 国产成人精品久久二区二区91 | 国产精品亚洲第一区在线暖暖韩国 | 在线一区视频 | 精品国产一区二区三区性色av | 欧美黄视频 | 久久一区二区三区四区五区 | 懂色av蜜桃av | 激情五月婷婷丁香 | 亚洲精品电影在线观看 | 久久精品国产一区二区三区不卡 | 亚洲精品视频播放 | 91视频一88av | 欧美久久大片 | 综合色影院 | 久久久久久中文字幕 | 91精品国产91久久综合桃花 | 亚洲精品在线视频 | 色免费在线视频 | 日本三级全黄三级a | 狠狠躁躁夜夜躁波多野结依 | 亚洲国产一区二区三区在线观看 | 亚洲色欲色欲www |