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

UIScrollView 不會滾動(故事板)

UIScrollView won#39;t scroll (Storyboards)(UIScrollView 不會滾動(故事板))
本文介紹了UIScrollView 不會滾動(故事板)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我是故事板的新手;我之前做過一些 Interface Builder 和很多手動 UI 定位.我搜索了這個問題,嘗試了其他相關帖子中的解決方案,但無濟于事.

I'm new to Storyboards; I've done some Interface Builder before and lots of manual UI positioning. I've searched this issue, tried the solutions found in the other relevant posts, to no avail.

我有一個在 Storyboards 中添加了 UIScrollView 的視圖控制器.ScrollView 插座已連接,屬性已合成.滾動啟用被選中.彈跳已檢查.即便如此,也沒有跡象表明會發生任何滾動.當我檢查 Bounces Vertically 時,我至少可以看到可滾動的內容,但在我釋放后它會反彈回來.我發現的框架尺寸設置為 320 和 521.我嘗試了不同的高度,但沒有任何幫助.(Storyboards 中設置的尺寸應該是多少,以適應新舊手機尺寸?).

I have a view controller with a UIScrollView added in Storyboards. The ScrollView outlet has been connected, the property synthesized. Scrolling Enabled is checked. Bounces is checked. Even then there was no indication that any scrolling would take place. When I checked Bounces Vertically, I could at least see the scrollable content, but it bounces back after I release. The frame size I found set at 320 and 521. I experimented with different heights but nothing helped. (What ought to be the size set in Storyboards that will accommodate the older and newer phone sizes?).

在viewDidLoad中,我添加了

In viewDidLoad, I added

    [scrollView setContentSize:CGSizeMake(320, 1000)];

隨后的日志語句確認該值已被接受.但這也無濟于事.

A log statement afterwards confirms that this value has been accepted. But it didn't help either.

有人在一篇帖子中建議添加:

Someone in one post suggested adding:

- (void)viewDidLayoutSubviews
{
    [super viewDidLayoutSubviews];
    [self.scrollView setContentSize:CGSizeMake(320, 808)];
}

這會在控制器加載時導致程序崩潰.

This had the effect of crashing the program when the controller loaded.

任何幫助將不勝感激!

謝謝.

推薦答案

事實證明有兩件事是必要的:

Two things turned out to be necessary:

1) 將滾動視圖的高度設置為 480.

1) Set height of scrollview to 480.

2) 將約束添加到滾動視圖的最底部字段.約束是 Pin >> Bottom Space to Superview.

2) Add constraint to the bottommost field in the scrollview. The constraint was Pin >> Bottom Space to Superview.

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

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

相關文檔推薦

how to set scrollview content size in swift 3.0(如何在 swift 3.0 中設置滾動視圖內容大小)
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 可縮放?)
主站蜘蛛池模板: 国产精品免费大片 | 日韩精品视频在线免费观看 | 国产美女视频一区 | 欧美一卡二卡在线观看 | 国产在线网址 | 亚洲vs天堂 | 国产精品视频播放 | 久久日韩精品一区二区三区 | 天天干在线播放 | 国产资源在线观看 | 99亚洲| 国产精品国产三级国产aⅴ中文 | 欧美1—12sexvideos | 一道本在线 | 夜夜久久 | 99免费在线观看 | 欧美日韩在线一区二区 | 亚洲成人免费 | 免费福利视频一区二区三区 | 国产一区二区精品自拍 | 91免费入口 | 色网在线看 | 中文字幕亚洲一区二区三区 | 三级成人在线 | 中文字幕视频在线观看 | 91亚洲国产成人久久精品网站 | 亚洲美乳中文字幕 | 国产一二三区电影 | 亚洲精品视频导航 | 欧美在线日韩 | 在线国产一区二区三区 | 国产综合精品一区二区三区 | 国产精品一区二区久久精品爱微奶 | 日韩精品一区二区三区免费观看 | 视频一区二区在线观看 | 亚洲天堂免费在线 | 欧美理论 | 91人人澡人人爽 | 国产高清精品在线 | 黄色成人在线观看 | 日日夜夜精品视频 |