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

UIScrollView 邊界尚未在“viewDidLoad"中調整大小

UIScrollView bounds have not yet resized in quot;viewDidLoadquot;(UIScrollView 邊界尚未在“viewDidLoad中調整大小.)
本文介紹了UIScrollView 邊界尚未在“viewDidLoad"中調整大小.的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個 UIViewController 子類,它的視圖在 NIB 文件中配置.該視圖有一個 UIScrollView 子視圖.

I have a UIViewController subclass whose view is configured in a NIB file. The view has a UIScrollView subview.

UIScrollView 幾乎占據了它的整個 NIB 文件,但它的超級視圖作為子視圖添加到一個小得多的視圖(配置在不同的 NIB 中)——例如UIScrollView 是它自己的 NIB 高度的 80%,但最終只有應用程序窗口高度的 10%.

The UIScrollView takes up almost its entire NIB file but it's superview is added as a subview to a much smaller view (configured in a different NIB) - e.g. the UIScrollView is 80% the height of it's own NIB but ends up only being 10% the height of the application's window.

當我在 viewController 的 viewDidLoad 方法中調用 [scrollView bounds].size.height 時,我得到了 scrollView 相對于它自己的 NIB 的高度,而不是它最終調整為由其超級視圖指定的高度(例如 80窗口高度的 % 而不是 10%).

When I call [scrollView bounds].size.height in the viewController's viewDidLoad method, I get the height of the scrollView relative to it's own NIB, rather than the height it ends up resizing to as dictated by its superviews (e.g. 80% of the window's height rather than 10%).

如果我稍后調用 [scrollView bounds].size.height(例如處理旋轉事件),我會得到正確的值.

If I call [scrollView bounds].size.height later on (e.g. to handle a rotation event), I get the correct value.

最初我如何才能獲得正確調整大小的值?

How can I get the correctly re-sized value initially?

推薦答案

你試過用 viewWillAppear:viewDidAppear 處理嗎?

Have you tried dealing with it in viewWillAppear: or viewDidAppear?

這篇關于UIScrollView 邊界尚未在“viewDidLoad"中調整大小.的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
UIScrollView scrolling only with one finger(UIScrollView 只能用一根手指滾動)
Using UITouch inside a UIScrollView(在 UIScrollView 中使用 UITouch)
UitextField resignFirstResponder does not work in scroll view(UitextField resignFirstResponder 在滾動視圖中不起作用)
How to Stop a UIScrollView from Swallowing Touches(如何阻止 UIScrollView 吞下觸摸)
Make background color change during scroll(在滾動期間更改背景顏色)
主站蜘蛛池模板: 毛片网站免费观看 | 久久另类| 夜久久| 国产日韩欧美精品一区二区 | 久久合久久| 亚洲欧美综合精品另类天天更新 | 国产精品一级在线观看 | 日韩欧美黄色 | 成人精品视频在线 | 精品久久香蕉国产线看观看亚洲 | www.操.com | 日韩精品一区二区三区 | 日韩免费视频一区二区 | 国产第一亚洲 | 99久久视频| 99中文字幕 | 免费在线成人 | 中文字幕亚洲一区 | 欧美成人第一页 | 国产精品一二三区在线观看 | 国产精品色 | av日韩精品 | 国产精品国产精品国产专区不片 | 一区二区三区中文字幕 | 亚洲成av | 国产一区二区在线免费播放 | 日日躁狠狠躁aaaaxxxx | 亚洲不卡视频 | 国产高清在线精品 | 久久久做 | 欧美高清视频在线观看 | 日韩影院在线观看 | 日本久久久影视 | 国产精品久久久久久福利一牛影视 | 欧美精品一区二区三区在线播放 | 国产成人综合久久 | 久久久久91| 玖玖国产精品视频 | 99日韩| 日韩www| 91免费福利在线 |