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

在使用幀 0,0,0,0 初始化的故事板中創(chuàng)建的 Scroll

ScrollView created in storyboard initialized with frame 0,0,0,0(在使用幀 0,0,0,0 初始化的故事板中創(chuàng)建的 ScrollView)
本文介紹了在使用幀 0,0,0,0 初始化的故事板中創(chuàng)建的 ScrollView的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我在情節(jié)提要中創(chuàng)建了一個 UIScrollView,將其作為屬性鏈接到視圖控制器,現(xiàn)在我正在嘗試添加一些帶有分頁的子視圖.但是,即使我以圖形方式在情節(jié)提要中設(shè)置了尺寸,UIScrollView 的框架最終還是 0,0,0,0.即使我已經(jīng)在情節(jié)提要中以圖形方式指定了尺寸,是否還需要對尺寸進(jìn)行硬編碼?

I created a UIScrollView in the storyboard, linked it as a property to the view controller, and am now trying to add some subviews with pagination. But, even though I set the dimensions in the storyboard graphically, the frame of the UIScrollView ends up being 0,0,0,0. Am I required to hardcode the dimensions even though I already specified them graphically in the storyboard?

另外,有點(diǎn)相關(guān),是否可以自定義故事板中的子視圖以在此滾動視圖中使用?除非它已經(jīng)在控制器中,否則我似乎無法創(chuàng)建這樣的視圖.由于我只有一個控制器,并且可能有多個視圖,我想以圖形方式設(shè)置,我該如何做到這一點(diǎn)而不必以編程方式進(jìn)行?

Also, kind of related, is it possible to customize subviews in the storyboard to use in this scroll view? It seems that I cannot create such a view unless it is already within a controller. Since I only have one controller and potentially multiple views I want to set up graphically, how do I do this without having to do so programmatically?

推薦答案

使用故事板 viewDidLayoutSubviews 是您可以獲取所有視圖大小的地方.viewWillAppear 對我不起作用,總是返回 (0,0,0,0);

With storyboards viewDidLayoutSubviews is where you can get the size of all your views. viewWillAppear did not work for me and always returned (0,0,0,0);

這篇關(guān)于在使用幀 0,0,0,0 初始化的故事板中創(chuàng)建的 ScrollView的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)行時,使用 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 可縮放?)
主站蜘蛛池模板: 日本久久综合网 | 天天干狠狠操 | 免费看片国产 | 亚洲91精品 | 国产1区| 超碰地址| 国产精品亚洲二区 | 日韩一区二区久久 | 成人在线视频一区 | 亚洲精品无人区 | 国产一区二区电影 | 久久色视频| 亚洲丝袜天堂 | 成人国产精品久久久 | 精品久久久久一区二区国产 | 久久久久久国产精品 | 日本视频免费观看 | 91精品国产乱码久久久久久 | 中文字幕国产视频 | 91亚洲精华国产 | 九七午夜剧场福利写真 | 天堂素人约啪 | 欧美乱大交xxxxx另类电影 | 国产精品一区一区 | 日韩国产一区 | 午夜免费视频 | 国产精品久久久久久福利一牛影视 | 久久久久久久久国产成人免费 | 久久99精品久久久久久 | 欧美日韩电影一区 | 国产精品久久久久永久免费观看 | 一色一黄视频 | 精品欧美一区二区三区久久久 | 91久久 | 国产一区二区三区在线视频 | 91直接看| 久久99视频| 日韩有码在线播放 | 青青久久久| 成人二区 | 国产成人高清成人av片在线看 |