diff --git a/TIUIElements/Sources/Views/Placeholder/Views/BasePlaceholderImageView.swift b/TIUIElements/Sources/Views/Placeholder/Views/BasePlaceholderImageView.swift index 71be8d2e..40346aae 100644 --- a/TIUIElements/Sources/Views/Placeholder/Views/BasePlaceholderImageView.swift +++ b/TIUIElements/Sources/Views/Placeholder/Views/BasePlaceholderImageView.swift @@ -24,24 +24,20 @@ import TIUIKitCore import UIKit open class BasePlaceholderImageView: UIImageView, - InitializableViewProtocol, - AppearanceUpdatable { + InitializableViewProtocol { public let placeholderView = Placeholder() public var placeholderConstraints: SubviewConstraints? - public var cachedAppearance: UIView.DefaultWrappedAppearance? open override var image: UIImage? { get { super.image } set { - placeholderView.isHidden = newValue == nil ? false : true + placeholderView.isHidden = newValue != nil super.image = newValue - - updateAppearance() } } @@ -104,18 +100,11 @@ open class BasePlaceholderImageView: UIImageView, // MARK: - Open methods - open func configureAppearance(appearance: BaseWrappedViewHolderAppearance) { - cachedAppearance = appearance.subviewAppearance + open func configureBasePlaceholder(appearance: BaseWrappedViewHolderAppearance) { configureUIView(appearance: appearance) - updateAppearance() - } - - open func updateAppearance() { - if let cachedAppearance = cachedAppearance { - placeholderView.configureUIView(appearance: cachedAppearance) - configurePlaceholderLayout(layout: cachedAppearance.layout) - } + placeholderView.configureUIView(appearance: appearance.subviewAppearance) + configurePlaceholderLayout(layout: appearance.subviewAppearance.layout) } // MARK: - Private methods diff --git a/TIUIElements/Sources/Views/Placeholder/Views/DefaultPlaceholderImageView.swift b/TIUIElements/Sources/Views/Placeholder/Views/DefaultPlaceholderImageView.swift index 5d3d3cfc..f73677dd 100644 --- a/TIUIElements/Sources/Views/Placeholder/Views/DefaultPlaceholderImageView.swift +++ b/TIUIElements/Sources/Views/Placeholder/Views/DefaultPlaceholderImageView.swift @@ -71,6 +71,6 @@ final public class DefaultPlaceholderImageView: BasePlaceholderImageView