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

如何在 Interface Builder 中使用 UIScrollView?

how do I use UIScrollView in Interface Builder?(如何在 Interface Builder 中使用 UIScrollView?)
本文介紹了如何在 Interface Builder 中使用 UIScrollView?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

雖然我過去通過編程操作成功地使用了 UIScrollView,但我無法通過僅在 Interface Builder 中設(shè)置它來使其工作.

While I've used UIScrollView successfully in the past by manipulating it programmatically, I'm having trouble getting it to work by setting it up exclusively in Interface Builder.

我的 iPhone 應(yīng)用中有一個(gè)簡(jiǎn)單的關(guān)于"頁面.它有一個(gè) UITextView、一些圖標(biāo)和指向我的其他應(yīng)用程序的鏈接.我已將所有這些視圖添加到我的 UIScrollView 中,并對(duì)其進(jìn)行排列以使它們的總大小 > 480.當(dāng)我啟動(dòng)我的應(yīng)用程序時(shí),滾動(dòng)視圖僅顯示適合屏幕的內(nèi)容,并且沒有滾動(dòng).

I have a simple "about" page in my iPhone app. It has a UITextView, some icons, and links to my other apps. I have added all of these views to my UIScrollView, arranging them so that their total size is > 480. When I launch my app, the scrollview displays only the contents that fit on the screen, and nothing scrolls.

是否可以完全通過 IB 來完成,還是必須通過代碼來操作 contentSize?

Is it possible to do this entirely via IB, or must I manipulate the contentSize via code?

推薦答案

你忘記設(shè)置 UIScrollView 的 contentSize 屬性了.奇怪的是,您不能從 Interface Builder 執(zhí)行此操作.您必須從管理此滾動(dòng)視圖的視圖控制器中執(zhí)行此操作.

You forgot to set the contentSize property of the UIScrollView. Strangely enough you can not do this from Interface Builder. You will have to do it from the view controller managing this scroll view.

這篇關(guān)于如何在 Interface Builder 中使用 UIScrollView?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

How to subclass UIScrollView and make the delegate property private(如何繼承 UIScrollView 并使委托屬性私有)
Swift - how to get last taken 3 photos from photo library?(Swift - 如何從照片庫中獲取最后拍攝的 3 張照片?)
Setting contentOffset programmatically triggers scrollViewDidScroll(以編程方式設(shè)置 contentOffset 觸發(fā) scrollViewDidScroll)
Photos app-like gap between pages in UIScrollView with pagingEnabled(使用 pagingEnabled 的 UIScrollView 中頁面之間的照片應(yīng)用程序式間隙)
why UIScrollView is leaving space from top in ios 6 and ios 7(為什么 UIScrollView 在 ios 6 和 ios 7 中從頂部留下空間)
UIScrollView pauses NSTimer while scrolling(UIScrollView 在滾動(dòng)時(shí)暫停 NSTimer)
主站蜘蛛池模板: 欧美11一13sex性hd | 国产一区电影 | 精品视频国产 | 日韩三级电影一区二区 | 国产亚洲黄色片 | 久久久久国产一级毛片 | 久久久成人免费视频 | 亚洲一区 中文字幕 | 91美女在线 | 一区二区三区观看视频 | 老司机久久 | 日本一区精品 | 网站国产| 欧美一区二区三区日韩 | 成人在线精品视频 | 成人国产精品久久久 | 精品国产色 | 在线观看视频亚洲 | 免费精品久久久久久中文字幕 | 日韩综合 | 亚洲精品自在在线观看 | 欧美精品网 | 99reav| 色.com | 综合色久| 欧美精品一区在线发布 | 日韩欧美在线不卡 | av高清毛片 | 亚洲欧美在线视频 | 国产精品久久久久久久久久久免费看 | 超碰日本| 99热最新网址 | 毛片久久久 | 成人在线视频免费观看 | 色综合久| 国产黄视频在线播放 | 久久久久中文字幕 | 久久久xx| 二区亚洲| 国产精品国产三级国产aⅴ中文 | 99re在线视频 |