fix: code review notes
This commit is contained in:
parent
f3ed27e83f
commit
4ccebe8e8b
|
|
@ -175,6 +175,14 @@ open class BasePlaceholderView<ImageView: UIView>: 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<ImageView: UIView>: 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
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public final class DefaultPlaceholderView: BasePlaceholderView<UIImageView>, 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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue