rotation checking
update size Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
1044282c33
commit
25ebcff2d9
@ -266,6 +266,15 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
||||
containerView.bridge_isAccessibilityElementBlock = { [weak self] in self?.onClickSubscriber != nil }
|
||||
containerView.accessibilityHint = "Double tap to open."
|
||||
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)
|
||||
|
||||
}
|
||||
|
||||
@ -423,7 +432,7 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
||||
heightConstraint?.activate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private func updateContainerView() {
|
||||
applyBackgroundEffects()
|
||||
|
||||
@ -469,8 +478,8 @@ open class TileContainerBase<PaddingType: DefaultValuing>: Control where Padding
|
||||
|
||||
} else {
|
||||
containerView.applyAlignment(distribution == .fill ? .fill : alignment)
|
||||
if let superview, distribution == .fill, !isPinnedHorizontallyToSuperview() {
|
||||
sizeContainerView(width: superview.frame.size.width)
|
||||
if distribution == .fill, !isPinnedHorizontallyToSuperview(), let size = horizontalPinnedSize() {
|
||||
sizeContainerView(width: size.width)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user