rotation checking
update size Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
1044282c33
commit
25ebcff2d9
@ -267,6 +267,15 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
|||||||
containerView.accessibilityHint = "Double tap to open."
|
containerView.accessibilityHint = "Double tap to open."
|
||||||
containerView.accessibilityLabel = nil
|
containerView.accessibilityLabel = nil
|
||||||
|
|
||||||
|
NotificationCenter.default
|
||||||
|
.publisher(for: UIDevice.orientationDidChangeNotification)
|
||||||
|
.sink() { [weak self] _ in
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.001) { [weak self] in
|
||||||
|
guard let self else { return }
|
||||||
|
setNeedsUpdate()
|
||||||
|
}
|
||||||
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Overriden to take the hit if there is an onClickSubscriber and the view is not a UIControl
|
/// Overriden to take the hit if there is an onClickSubscriber and the view is not a UIControl
|
||||||
@ -469,8 +478,8 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
containerView.applyAlignment(distribution == .fill ? .fill : alignment)
|
containerView.applyAlignment(distribution == .fill ? .fill : alignment)
|
||||||
if let superview, distribution == .fill, !isPinnedHorizontallyToSuperview() {
|
if distribution == .fill, !isPinnedHorizontallyToSuperview(), let size = horizontalPinnedSize() {
|
||||||
sizeContainerView(width: superview.frame.size.width)
|
sizeContainerView(width: size.width)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user