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

標(biāo)簽不顯示滾動(dòng)視圖中的所有文本

Label doesn#39;t show all the text inside scrollView(標(biāo)簽不顯示滾動(dòng)視圖中的所有文本)
本文介紹了標(biāo)簽不顯示滾動(dòng)視圖中的所有文本的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我希望 DecriptionLabel(Lorem Ipsum 之一)使其中的所有文本都可見.如您所見,它正在被修剪.

I want the DecriptionLabel (the Lorem Ipsum one) to have all the text inside it visible. As you can see, it is getting trimmed.

這兩個(gè)按鈕應(yīng)該在其他所有東西的下方,但是在 DescriptionLabel 包含小文本的情況下,按鈕應(yīng)該貼在視圖的底部.

The two buttons should be under everything else, but in the case where DescriptionLabel contains a small text, the buttons should stick to the bottom of the view.

這就是為什么我選擇按鈕和 DescriptionLabel 之間的 >= 20 距離(如果有意義的話).

This is why I chose a >= 20 distance between the buttons and DescriptionLabel if it makes any sense.

如何解決文本的修剪問題?

How can I solve the trimming of the text?

謝謝.

推薦答案

我最初是在回答 如果內(nèi)容不夠大,如何讓按鈕粘在滾動(dòng)視圖的底部?但是因?yàn)樗粯?biāo)記為這個(gè)的副本我在這里發(fā)布我的答案.請嘗試通過以下方式設(shè)置約束:https://imageshack.com/a/img923/6671/Txzu98.png
訣竅是您將 Button.Bottom Equal To ContainerView.Bottom 設(shè)置為 lower priority(我使用 750)而不是 Button.Top 大于或等于 Label.底部(這里我使用默認(rèn)1000)
標(biāo)簽的行數(shù)必須設(shè)置為 0.
按鈕的高度應(yīng)由高度約束設(shè)置(在本例中為 50).
容器視圖高度約束應(yīng)具有低優(yōu)先級(jí)(在這種情況下 250)
您應(yīng)該運(yùn)行代碼以查看設(shè)備或模擬器上的實(shí)際結(jié)果.故事板顯示它有點(diǎn)不同.

對于當(dāng)前問題:https://imageshack.com/a/img923/7276/tQeT0h.png
基本思路是一樣的.
Button Down 與上述答案中的 Button 具有相同的約束,但沒有 Button.Top 大于或等于 Label.Bottom.
Button Up 和 Button Down 之間應(yīng)該有固定的垂直約束.我正在設(shè)置具有固定高度的 Button Up 并設(shè)置尾隨和前導(dǎo)約束等于 Button Down 的尾隨和前導(dǎo).
約束 Button.Top 大于或等于 Label.Bottom 現(xiàn)在是 Button Up.Top 大于或等于 Label.Bottom

I was originally answering How to make button stick to bottom of scroll view if the content isn't large enough? but since it is marked as duplicate of this one I am posting my answer here. Please try to set your constraints the following way: https://imageshack.com/a/img923/6671/Txzu98.png
The trick is that you set Button.Bottom Equal To ContainerView.Bottom with lower priority (I use 750) than Button.Top Greater Than Or Equal To Label.Bottom (Here I use default 1000)
The Label has to have number of lines set to 0.
The height of the button should be set by height constraint (in this case is 50).
The Container View Height constraint should be with low priority (in this case 250)
You should run the code to see actual result on device or simulator. Storyboard shows it a bit differently.

For the current question: https://imageshack.com/a/img923/7276/tQeT0h.png
The basic idea is the same.
Button Down has the same constraints as Button from above answer without Button.Top Greater Than Or Equal To Label.Bottom.
There should be fixed vertical constraint between Button Up and Button Down. I am setting Button Up with fixed Height and setting trailing and leading constraint equal to trailing and leading of Button Down.
The constraint Button.Top Greater Than Or Equal To Label.Bottom is now Button Up.Top Greater Than Or Equal To Label.Bottom

這篇關(guān)于標(biāo)簽不顯示滾動(dòng)視圖中的所有文本的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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è)置滾動(dòng)視圖內(nèi)容大小)
Stop a UITableView from automatically scrolling(阻止 UITableView 自動(dòng)滾動(dòng))
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)行時(shí),使用 iOS 6.0 SDK 并為 iOS 5 Target 構(gòu)建會(huì)導(dǎo)致 UIScrollView setMinimumZ
Create partial-screen UIPageViewController programmatically(以編程方式創(chuàng)建部分屏幕 UIPageViewController)
how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
主站蜘蛛池模板: 成人在线观看免费 | 日韩一区二区三区av | 国产精品成人一区 | 国产亚洲一区二区三区在线观看 | 亚洲精品日韩在线 | 国产欧美精品一区二区色综合 | 亚洲字幕在线观看 | av色站| av黄在线观看| 亚洲国产精品久久人人爱 | 欧美精品一区在线 | 国产99久久 | 成人日韩精品 | 亚洲一区二区免费电影 | 日本黄视频在线观看 | 欧美日韩国产一区二区三区 | 亚洲精品一 | 精品一区二区在线观看 | 久久久高清 | 在线播放国产一区二区三区 | 国产在线对白 | 国产乱码精品一区二区三区忘忧草 | 欧美精品一区二区蜜桃 | 欧美情趣视频 | 精品在线观看一区 | 欧美久久久久久久 | av大片在线观看 | av网站免费 | 国产良家自拍 | 国产一级在线 | 成人午夜在线 | 日本欧美视频 | 成人免费在线视频 | 精品国产欧美一区二区 | 国产人成精品一区二区三 | 精品国产一区二区三区久久 | 日本精品视频 | 天天干天天想 | 成人在线看片 | 精品一区二区久久久久久久网站 | 国产女人与拘做视频免费 |