Script control size fix
This commit is contained in:
@@ -43,8 +43,8 @@ class ScriptPolicyControl: UIControl
|
|||||||
denyButton.imageView?.contentMode = .scaleAspectFit
|
denyButton.imageView?.contentMode = .scaleAspectFit
|
||||||
}
|
}
|
||||||
|
|
||||||
override var intrinsicContentSize: CGSize {
|
override func sizeThatFits(_ size: CGSize) -> CGSize {
|
||||||
CGSize(width: 100.0, height: UIView.noIntrinsicMetric)
|
return segmentContainer.sizeThatFits(size)
|
||||||
}
|
}
|
||||||
|
|
||||||
override func layoutSubviews() {
|
override func layoutSubviews() {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class ScriptPolicyControlListCell: UICollectionViewListCell
|
|||||||
|
|
||||||
|
|
||||||
override func layoutSubviews() {
|
override func layoutSubviews() {
|
||||||
let policyControlWidth = CGFloat(80.0)
|
let policyControlWidth = policyControl.sizeThatFits(bounds.size).width
|
||||||
policyControl.frame = CGRect(
|
policyControl.frame = CGRect(
|
||||||
x: bounds.maxX - policyControlWidth - layoutMargins.right,
|
x: bounds.maxX - policyControlWidth - layoutMargins.right,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user