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

UIScrollView 不會滾動(故事板)

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

問題描述

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

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.

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

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

隨后的日志語句確認(rèn)該值已被接受.但這也無濟(jì)于事.

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

這會在控制器加載時(shí)導(dǎo)致程序崩潰.

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

任何幫助將不勝感激!

謝謝.

推薦答案

事實(shí)證明有兩件事是必要的:

Two things turned out to be necessary:

1) 將滾動視圖的高度設(shè)置為 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.

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

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

相關(guān)文檔推薦

how to set scrollview content size in swift 3.0(如何在 swift 3.0 中設(shè)置滾動視圖內(nèi)容大小)
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 模擬器上運(yùn)行時(shí),使用 iOS 6.0 SDK 并為 iOS 5 Target 構(gòu)建會導(dǎo)致 UIScrollView setMinimumZ
Create partial-screen UIPageViewController programmatically(以編程方式創(chuàng)建部分屏幕 UIPageViewController)
how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
主站蜘蛛池模板: 欧洲一区视频 | 午夜爱爱毛片xxxx视频免费看 | 熟女毛片| 日本不卡一区二区三区 | 久久99精品久久久久子伦 | 亚洲精品视频网站在线观看 | 亚欧精品一区 | 日韩欧美综合 | 成人黄色电影在线播放 | 国产精品极品美女在线观看免费 | 99在线免费视频 | 亚欧精品 | 欧美日韩一区二区在线播放 | 欧美一级黄色免费看 | 中文字幕精品一区 | 亚洲黄色国产 | 国产成人av电影 | 亚洲精品视频在线观看视频 | 亚洲国产精品一区 | 精品免费国产一区二区三区四区 | 久久久精品影院 | 九九天堂网 | 18av在线播放 | 久久免费观看视频 | 精品国产乱码久久久久久久久 | 国产一区二区影院 | 高清黄色 | 亚洲va国产日韩欧美精品色婷婷 | 成人在线观看免费 | 蜜桃av一区二区三区 | 可以免费观看的av片 | www.久久99| 成人动慢| 久久一日本道色综合久久 | 国产二区在线播放 | 免费一级网站 | 国户精品久久久久久久久久久不卡 | 中文字幕高清一区 | 久久91av | 欧美日韩在线观看一区 | av在线免费播放 |