久久久久久久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(在滾動期間更改背景顏色)
主站蜘蛛池模板: 91精品一区二区三区久久久久久 | 国产精品日日摸夜夜添夜夜av | 久久成人国产 | 国产精品美女久久久久aⅴ国产馆 | 国产视频久久久 | 欧美一区二区三区在线观看 | 一级高清 | 免费在线观看91 | 狠狠综合久久av一区二区老牛 | 99精品久久99久久久久 | 国产四区 | 国产成人精品免费视频大全最热 | 一区二区三区在线电影 | 午夜在线免费观看视频 | 国产一区视频在线 | 国产精品久久久亚洲 | 国产在线永久免费 | 国产在线aa | 国产三区在线观看视频 | 久久久www成人免费无遮挡大片 | 欧美片网站免费 | caoporn免费| 久久久国产精品入口麻豆 | 色频 | 色播久久久| 免费午夜电影 | 亚洲黄色高清视频 | 国产99久久久国产精品 | 久久国产精品一区 | 日韩精品在线观看一区二区 | 国产目拍亚洲精品99久久精品 | 天天弄天天操 | 日韩资源| 美女精品一区 | 4hu最新网址 | 久久国品片 | 国产精品久久亚洲 | 粉嫩粉嫩芽的虎白女18在线视频 | 久久精品国产一区二区电影 | 欧美jizzhd精品欧美巨大免费 | 青青久视频 |