
我希望“評論”文本顯示在 stackView 中第三個視圖的左上角(使用選擇按鈕查看)。
我試圖將標簽的頂部錨點設定為視圖的頂部錨點,并讓它顯示在第三個視圖之外?
uj5u.com熱心網友回復:
制作第三個視圖的@IBOutlet@IBOutlet weak var thirdView: UIView!
加入reviewsBoxLabel_thirdView
替換setupBottomLabelConstraints為:
func setupBottomLabelConstraints() {
thirdView.addSubview(reviewsBoxLabel)
reviewsBoxLabel.translatesAutoresizingMaskIntoConstraints=fals
reviewsBoxLabel.topAnchor.constraint(equalTo:thirdView.topAnchor).isActive=true
reviewsBoxLabel.leftAnchor.constraint(equalTo:thirdView.leftAnchor).isActive=true
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/536713.html
標籤:迅速用户界面
上一篇:如何在Swift中解碼JSON?
下一篇:實體成員“$isBrowsingWebsite”不能用于型別“MapPinSheetSectionOneView_Previews”
