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

為什么 UIScrollView 在 ios 6 和 ios 7 中從頂部留下空

why UIScrollView is leaving space from top in ios 6 and ios 7(為什么 UIScrollView 在 ios 6 和 ios 7 中從頂部留下空間)
本文介紹了為什么 UIScrollView 在 ios 6 和 ios 7 中從頂部留下空間的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我已關(guān)閉 Autolayout 并且 viewcontroller 嵌入在導(dǎo)航控制器中.我正在使用 Xcode 5,Storyboard.

I have turned off Autolayout and viewcontroller is embedded in navigation controller. I am using Xcode 5, Storyboard.

我不明白為什么它會(huì)從頂部留下空間.實(shí)際上,在故事板中,我將標(biāo)簽正好放在導(dǎo)航欄下方.但是當(dāng)我在模擬器上運(yùn)行它時(shí),它會(huì)從頂部留下空間.

I don't understand why is it leaving space from top. Actually in storyboard i have put my label exactly below navigation bar. But when i run it on simulator then it leaves space from top.

解決此問題的一種巧妙方法

One of the hacky way to resolve this

-(void)viewWillLayoutSubviews
{
   self.scrollViewMain.frame = CGRectMake(0, -70, 320, 800);

   self.scrollViewMain.contentSize = CGSizeMake(320, 800);
}

但是我錯(cuò)過了一些非常簡單的方法嗎?

推薦答案

在 Xcode 5 中,在 storyboard 中選擇你的控制器 > 在 Attribute Inspector 中禁用 Adjust Scroll View Insets還要檢查你是否設(shè)置了任何 contentInset

In Xcode 5, in storyboard select your controller > in Attribute Inspector disable Adjust Scroll View Insets Also check if you have set any contentInset

編輯:我附上了一張照片

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

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

相關(guān)文檔推薦

How to subclass UIScrollView and make the delegate property private(如何繼承 UIScrollView 并使委托屬性私有)
Photos app-like gap between pages in UIScrollView with pagingEnabled(使用 pagingEnabled 的 UIScrollView 中頁面之間的照片應(yīng)用程序式間隙)
Limiting the scrollable area in UIScrollView(限制 UIScrollView 中的可滾動(dòng)區(qū)域)
Setting up UIScrollView to swipe between 3 view controllers(設(shè)置 UIScrollView 在 3 個(gè)視圖控制器之間滑動(dòng))
UIScrollView with quot;Circularquot; scrolling(帶有“圓形的 UIScrollView滾動(dòng))
Deactivate UIScrollView decelerating(停用 UIScrollView 減速)
主站蜘蛛池模板: 91性视频 | 一区在线观看视频 | 久久久综合网 | 国产精品久久久久久无人区 | 美女福利视频 | 99一区二区 | 91精品国产综合久久久久久 | 综合久久综合 | 精品综合网 | 国产精品久久久国产盗摄 | 51免费看成人啪啪片 | 成人免费动漫 | 性av在线| 午夜国产在线观看 | 91精品国产综合久久久蜜臀 | 久久九九热 | 91网站免费 | 亚洲精品久久久久久久久 | 亚洲天天操 | 欧美在线视频一区二区 | 一区二区水蜜桃 | 亚洲人在线观看 | 日韩在线不卡 | 中文字幕免费av | 91精品免费视频 | 香蕉视频在线免费看 | 欧美日韩国产成人 | 久久精品国产免费 | 亚洲欧美日韩国产 | 国产黄色片在线观看 | 国产成人免费在线 | 成人福利在线观看 | 精品亚洲一区二区三区 | 国产视频一区二区在线 | 91久久久久国产一区二区 | 少妇一级淫片免费观看 | 国产精品久久久999 成人在线国产 | 亚洲欧美国产精品 | 亚洲欧美日本在线 | 久久青草视频 | 日韩欧美一级 |