本文介紹了如何在 iPhone 上使用滾動視圖?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我想顯示一個包含很多行的文本.我在滾動視圖中添加了一個多行標簽,但它沒有顯示任何內容.看起來這不是使用滾動視圖的正確方法.如何使用滾動視圖讓用戶可以向下拖動以查看更多文本?
I want to display a text with a lot of lines. I added a multiline-label to a scroll view, but it didn't show anything. Looks like this is not the correct way to use the scroll view. How to use scroll view so that users can drag down to see more text?
推薦答案
你可以只使用 UITextView.它是 UIScrollView 的子視圖,如果將其 text 屬性設置為超出其框架的文本量,則視圖將變為可滾動的.
You can just use a UITextView. It's a child of UIScrollView, and if you set it's text property to an amount of text that does not fit within it's frame, the view will become scrollable.
這篇關于如何在 iPhone 上使用滾動視圖?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!