diff --git a/TIUIElements/Sources/Views/Placeholder/Views/BasePlaceholderView.swift b/TIUIElements/Sources/Views/Placeholder/Views/BasePlaceholderView.swift index 25cecf3b..55663664 100644 --- a/TIUIElements/Sources/Views/Placeholder/Views/BasePlaceholderView.swift +++ b/TIUIElements/Sources/Views/Placeholder/Views/BasePlaceholderView.swift @@ -175,6 +175,14 @@ open class BasePlaceholderView: BaseInitializableView { controlsStackView.configureUIView(appearance: appearance.controlsViewAppearance) } + open func configureLayoutForKeyboard(_ notification: Notification, isKeyboardHidden: Bool) { + let multiplier = isKeyboardHidden ? 1.0 : -1.0 + + if let height = getKeyboardHeight(notification) { + controlsViewConstraints?.bottomConstraint?.constant = multiplier * height / 2 + } + } + // MARK: - Private methods private func configureImageViewLayout(layout: WrappedViewLayout) { @@ -224,14 +232,6 @@ open class BasePlaceholderView: BaseInitializableView { trailingConstraint: constraints.trailingConstraint) } - private func configureLayoutForKeyboard(_ notification: Notification, isKeyboardHidden: Bool) { - let multiplier = isKeyboardHidden ? 1.0 : -1.0 - - if let height = getKeyboardHeight(notification) { - controlsViewConstraints?.bottomConstraint?.constant = multiplier * height / 2 - } - } - private func getKeyboardHeight(_ notification: Notification) -> CGFloat? { guard let userInfo = notification.userInfo else { return nil diff --git a/TIUIElements/Sources/Views/Placeholder/Views/DefaultPlaceholderView.swift b/TIUIElements/Sources/Views/Placeholder/Views/DefaultPlaceholderView.swift index 4c41aa46..de9761ad 100644 --- a/TIUIElements/Sources/Views/Placeholder/Views/DefaultPlaceholderView.swift +++ b/TIUIElements/Sources/Views/Placeholder/Views/DefaultPlaceholderView.swift @@ -51,7 +51,7 @@ public final class DefaultPlaceholderView: BasePlaceholderView, App } if size.height.isFinite, size.height > .zero { - imageViewConstraints?.widthConstraint?.constant = size.height + imageViewConstraints?.heightConstraint?.constant = size.height } if size.width.isFinite, size.width > .zero {