From 1a9ed8353bd1d51d241f8559e6a2475c38a3c491 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Tue, 7 Nov 2023 16:29:10 +0300 Subject: [PATCH] feat: Set reasonable defaults for SkeletonConfiguration --- CHANGELOG.md | 4 ++++ TIAppleMapUtils/TIAppleMapUtils.podspec | 2 +- TIApplication/TIApplication.podspec | 2 +- TIAuth/TIAuth.podspec | 2 +- TIBottomSheet/TIBottomSheet.podspec | 2 +- TICoreGraphicsUtils/TICoreGraphicsUtils.podspec | 2 +- TIDeeplink/TIDeeplink.podspec | 2 +- TIDeveloperUtils/TIDeveloperUtils.podspec | 2 +- TIEcommerce/TIEcommerce.podspec | 2 +- TIFoundationUtils/TIFoundationUtils.podspec | 2 +- TIGoogleMapUtils/TIGoogleMapUtils.podspec | 2 +- TIKeychainUtils/TIKeychainUtils.podspec | 2 +- TILogging/TILogging.podspec | 2 +- TIMapUtils/TIMapUtils.podspec | 2 +- TIMoyaNetworking/TIMoyaNetworking.podspec | 2 +- TINetworking/TINetworking.podspec | 2 +- TINetworkingCache/TINetworkingCache.podspec | 2 +- TIPagination/TIPagination.podspec | 2 +- TISwiftUICore/TISwiftUICore.podspec | 2 +- TISwiftUtils/TISwiftUtils.podspec | 2 +- TITableKitUtils/TITableKitUtils.podspec | 2 +- TITextProcessing/TITextProcessing.podspec | 2 +- .../BaseViewSkeletonsConfiguration.swift | 8 +++++++- .../ContainerViewSkeletonsConfiguration.swift | 10 ++++++++-- .../Configuration/SkeletonsConfiguration.swift | 11 ++++++++++- .../TextSkeletonsConfiguration.swift | 4 ++-- .../Protocols/SkeletonsPresenter.swift | 4 ++++ .../Sources/Views/Skeletons/SkeletonLayer.swift | 17 +++++++++-------- TIUIElements/TIUIElements.podspec | 2 +- TIUIKitCore/TIUIKitCore.podspec | 2 +- TIWebView/TIWebView.podspec | 2 +- TIYandexMapUtils/TIYandexMapUtils.podspec | 2 +- 32 files changed, 69 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 064e3f4e..eb916dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### 1.54.3 + +- **Update**: Set reasonable defaults for `SkeletonConfiguration`. + ### 1.54.2 - **Update**: Changed access level from internal to public of title and subtitle view in `BaseTitleSubtitleView`. diff --git a/TIAppleMapUtils/TIAppleMapUtils.podspec b/TIAppleMapUtils/TIAppleMapUtils.podspec index 609de792..d0ed27fc 100644 --- a/TIAppleMapUtils/TIAppleMapUtils.podspec +++ b/TIAppleMapUtils/TIAppleMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIAppleMapUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Set of helpers for map objects clustering and interacting using Apple MapKit.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIApplication/TIApplication.podspec b/TIApplication/TIApplication.podspec index 5a04ae92..80500744 100644 --- a/TIApplication/TIApplication.podspec +++ b/TIApplication/TIApplication.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIApplication' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Application architecture.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIAuth/TIAuth.podspec b/TIAuth/TIAuth.podspec index 5fb09220..7f5ca4a2 100644 --- a/TIAuth/TIAuth.podspec +++ b/TIAuth/TIAuth.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIAuth' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Login, registration, confirmation and other related actions' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIBottomSheet/TIBottomSheet.podspec b/TIBottomSheet/TIBottomSheet.podspec index ae1697fa..050adf8a 100644 --- a/TIBottomSheet/TIBottomSheet.podspec +++ b/TIBottomSheet/TIBottomSheet.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIBottomSheet' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Base models for creating bottom sheet view controllers' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TICoreGraphicsUtils/TICoreGraphicsUtils.podspec b/TICoreGraphicsUtils/TICoreGraphicsUtils.podspec index a06535df..ca086013 100644 --- a/TICoreGraphicsUtils/TICoreGraphicsUtils.podspec +++ b/TICoreGraphicsUtils/TICoreGraphicsUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TICoreGraphicsUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'CoreGraphics drawing helpers' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIDeeplink/TIDeeplink.podspec b/TIDeeplink/TIDeeplink.podspec index 90ba7278..052d438b 100644 --- a/TIDeeplink/TIDeeplink.podspec +++ b/TIDeeplink/TIDeeplink.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIDeeplink' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Deeplink service API' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIDeveloperUtils/TIDeveloperUtils.podspec b/TIDeveloperUtils/TIDeveloperUtils.podspec index a5a8b61b..0f60ff07 100644 --- a/TIDeveloperUtils/TIDeveloperUtils.podspec +++ b/TIDeveloperUtils/TIDeveloperUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIDeveloperUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Universal web view API' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIEcommerce/TIEcommerce.podspec b/TIEcommerce/TIEcommerce.podspec index a896ece5..efd73863 100644 --- a/TIEcommerce/TIEcommerce.podspec +++ b/TIEcommerce/TIEcommerce.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIEcommerce' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Cart, products, promocodes, bonuses and other related actions' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index ddbd5660..4d093c6f 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIFoundationUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Set of helpers for Foundation framework classes.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIGoogleMapUtils/TIGoogleMapUtils.podspec b/TIGoogleMapUtils/TIGoogleMapUtils.podspec index 66b7de97..2bb770e6 100644 --- a/TIGoogleMapUtils/TIGoogleMapUtils.podspec +++ b/TIGoogleMapUtils/TIGoogleMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIGoogleMapUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Set of helpers for map objects clustering and interacting using Google Maps SDK.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIKeychainUtils/TIKeychainUtils.podspec b/TIKeychainUtils/TIKeychainUtils.podspec index 6756ded5..4af00b2b 100644 --- a/TIKeychainUtils/TIKeychainUtils.podspec +++ b/TIKeychainUtils/TIKeychainUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIKeychainUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Set of helpers for Keychain classes.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TILogging/TILogging.podspec b/TILogging/TILogging.podspec index 06cc9807..fa5bc60e 100644 --- a/TILogging/TILogging.podspec +++ b/TILogging/TILogging.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TILogging' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Logging for TI libraries.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIMapUtils/TIMapUtils.podspec b/TIMapUtils/TIMapUtils.podspec index 94b3401a..1877211d 100644 --- a/TIMapUtils/TIMapUtils.podspec +++ b/TIMapUtils/TIMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIMapUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Set of helpers for map objects clustering and interacting.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIMoyaNetworking/TIMoyaNetworking.podspec b/TIMoyaNetworking/TIMoyaNetworking.podspec index c852fa06..2a3adb40 100644 --- a/TIMoyaNetworking/TIMoyaNetworking.podspec +++ b/TIMoyaNetworking/TIMoyaNetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIMoyaNetworking' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Moya + Swagger network service.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TINetworking/TINetworking.podspec b/TINetworking/TINetworking.podspec index 9fcd4ee8..e2e9d1f4 100644 --- a/TINetworking/TINetworking.podspec +++ b/TINetworking/TINetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TINetworking' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Swagger-frendly networking layer helpers.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TINetworkingCache/TINetworkingCache.podspec b/TINetworkingCache/TINetworkingCache.podspec index 4e0b9527..a15c809b 100644 --- a/TINetworkingCache/TINetworkingCache.podspec +++ b/TINetworkingCache/TINetworkingCache.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TINetworkingCache' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Caching results of EndpointRequests.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIPagination/TIPagination.podspec b/TIPagination/TIPagination.podspec index f3a17d70..a3d5edc1 100644 --- a/TIPagination/TIPagination.podspec +++ b/TIPagination/TIPagination.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIPagination' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Generic pagination component.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TISwiftUICore/TISwiftUICore.podspec b/TISwiftUICore/TISwiftUICore.podspec index bd489d68..5305e7ee 100644 --- a/TISwiftUICore/TISwiftUICore.podspec +++ b/TISwiftUICore/TISwiftUICore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUICore' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Core UI elements: protocols, views and helpers.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index 5995a365..b92ece28 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Bunch of useful helpers for Swift development.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITableKitUtils/TITableKitUtils.podspec b/TITableKitUtils/TITableKitUtils.podspec index b5b9dc04..b0f9bc3f 100644 --- a/TITableKitUtils/TITableKitUtils.podspec +++ b/TITableKitUtils/TITableKitUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITableKitUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Set of helpers for TableKit classes.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITextProcessing/TITextProcessing.podspec b/TITextProcessing/TITextProcessing.podspec index 79391e2d..44378208 100644 --- a/TITextProcessing/TITextProcessing.podspec +++ b/TITextProcessing/TITextProcessing.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITextProcessing' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'A text processing service helping to get a text mask and a placeholder from incoming regex.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIElements/Sources/Views/Skeletons/Configuration/BaseViewSkeletonsConfiguration.swift b/TIUIElements/Sources/Views/Skeletons/Configuration/BaseViewSkeletonsConfiguration.swift index fc1c94f6..6a99545e 100644 --- a/TIUIElements/Sources/Views/Skeletons/Configuration/BaseViewSkeletonsConfiguration.swift +++ b/TIUIElements/Sources/Views/Skeletons/Configuration/BaseViewSkeletonsConfiguration.swift @@ -25,6 +25,12 @@ import UIKit open class BaseViewSkeletonsConfiguration { + open class Defaults { + public static var cornerRadius: CGFloat { + 16 + } + } + public enum Shape { case rectangle(cornerRadius: CGFloat) case circle @@ -37,7 +43,7 @@ open class BaseViewSkeletonsConfiguration { public init(padding: UIEdgeInsets = .edges(5), maxWidth: CGFloat = .infinity, - shape: Shape = .rectangle(cornerRadius: .zero)) { + shape: Shape = .rectangle(cornerRadius: Defaults.cornerRadius)) { self.shape = shape self.maxWidth = maxWidth diff --git a/TIUIElements/Sources/Views/Skeletons/Configuration/ContainerViewSkeletonsConfiguration.swift b/TIUIElements/Sources/Views/Skeletons/Configuration/ContainerViewSkeletonsConfiguration.swift index d44adeef..1e898d28 100644 --- a/TIUIElements/Sources/Views/Skeletons/Configuration/ContainerViewSkeletonsConfiguration.swift +++ b/TIUIElements/Sources/Views/Skeletons/Configuration/ContainerViewSkeletonsConfiguration.swift @@ -24,12 +24,18 @@ import UIKit open class ContainerViewSkeletonsConfiguration: BaseViewSkeletonsConfiguration { + open class Defaults: BaseViewSkeletonsConfiguration.Defaults { + public static var borderWidth: CGFloat { + 1 + } + } + public var borderWidth: CGFloat - public init(borderWidth: CGFloat = .zero, + public init(borderWidth: CGFloat = Defaults.borderWidth, padding: UIEdgeInsets = .zero, maxWidth: CGFloat = .infinity, - shape: Shape = .rectangle(cornerRadius: .zero)) { + shape: Shape = .rectangle(cornerRadius: Defaults.cornerRadius)) { self.borderWidth = borderWidth diff --git a/TIUIElements/Sources/Views/Skeletons/Configuration/SkeletonsConfiguration.swift b/TIUIElements/Sources/Views/Skeletons/Configuration/SkeletonsConfiguration.swift index 46c41ec3..db603054 100644 --- a/TIUIElements/Sources/Views/Skeletons/Configuration/SkeletonsConfiguration.swift +++ b/TIUIElements/Sources/Views/Skeletons/Configuration/SkeletonsConfiguration.swift @@ -25,6 +25,15 @@ import UIKit open class SkeletonsConfiguration { + open class Defaults { + public static var animation: Closure { + { _ in + let animConfig = DirectionalSkeletonsAnimationConfiguration(direction: .leftToRight, duration: 3) + return SkeletonsAnimationBuilder.createDirectionalGradientAnimation(animConfig) + } + } + } + public var viewConfiguration: BaseViewSkeletonsConfiguration public var containerViewConfiguration: ContainerViewSkeletonsConfiguration public var labelConfiguration: TextSkeletonsConfiguration @@ -47,7 +56,7 @@ open class SkeletonsConfiguration { containerViewConfiguration: ContainerViewSkeletonsConfiguration = .init(), labelConfiguration: TextSkeletonsConfiguration = .init(), imageViewConfiguration: BaseViewSkeletonsConfiguration = .init(shape: .circle), - animation: Closure? = nil, + animation: Closure? = Defaults.animation, baseSkeletonBackgroundColor: UIColor? = nil, skeletonsBackgroundColor: UIColor = .lightGray.withAlphaComponent(0.7), configurationDelegate: SkeletonsConfigurationDelegate? = nil) { diff --git a/TIUIElements/Sources/Views/Skeletons/Configuration/TextSkeletonsConfiguration.swift b/TIUIElements/Sources/Views/Skeletons/Configuration/TextSkeletonsConfiguration.swift index b591891d..8c2313b3 100644 --- a/TIUIElements/Sources/Views/Skeletons/Configuration/TextSkeletonsConfiguration.swift +++ b/TIUIElements/Sources/Views/Skeletons/Configuration/TextSkeletonsConfiguration.swift @@ -26,7 +26,7 @@ import UIKit open class TextSkeletonsConfiguration: BaseViewSkeletonsConfiguration { - public enum Defaults { + open class Defaults: BaseViewSkeletonsConfiguration.Defaults { public static var numberOfLines: Int { 1 } @@ -55,7 +55,7 @@ open class TextSkeletonsConfiguration: BaseViewSkeletonsConfiguration { lineSpacing: CGFloat? = nil, padding: UIEdgeInsets = .edges(5), maxWidth: CGFloat = .infinity, - shape: Shape = .rectangle(cornerRadius: .zero)) { + shape: Shape = .rectangle(cornerRadius: Defaults.cornerRadius)) { self.numberOfLines = numberOfLines self.linesWidthFraction = linesWidthFraction diff --git a/TIUIElements/Sources/Views/Skeletons/Protocols/SkeletonsPresenter.swift b/TIUIElements/Sources/Views/Skeletons/Protocols/SkeletonsPresenter.swift index 198186bc..b218af1e 100644 --- a/TIUIElements/Sources/Views/Skeletons/Protocols/SkeletonsPresenter.swift +++ b/TIUIElements/Sources/Views/Skeletons/Protocols/SkeletonsPresenter.swift @@ -51,6 +51,10 @@ extension SkeletonsPresenter { } public func showSkeletons() { + if !isSkeletonLayerHidden { + hideSkeletons() + } + skeletonsHolder.showSkeletons(viewsToSkeletons: viewsToSkeletons, skeletonsConfiguration) } diff --git a/TIUIElements/Sources/Views/Skeletons/SkeletonLayer.swift b/TIUIElements/Sources/Views/Skeletons/SkeletonLayer.swift index 8ab93d53..0f936b8a 100644 --- a/TIUIElements/Sources/Views/Skeletons/SkeletonLayer.swift +++ b/TIUIElements/Sources/Views/Skeletons/SkeletonLayer.swift @@ -24,7 +24,7 @@ import UIKit open class SkeletonLayer: CAShapeLayer { - private enum Constants { + public enum Defaults { static var animationKeyPath: String { "skeletonAnimation" } @@ -72,7 +72,7 @@ open class SkeletonLayer: CAShapeLayer { public var isSkeletonsHolder: Bool = false public var isAnimating: Bool { - animationLayer.animation(forKey: Constants.animationKeyPath) != nil + animationLayer.animation(forKey: Defaults.animationKeyPath) != nil } // MARK: - Init @@ -100,17 +100,18 @@ open class SkeletonLayer: CAShapeLayer { // MARK: - Open methods open func bind(to viewType: ViewType) { - layerOwnerView = viewType.view + let view = viewType.view + layerOwnerView = view configureAppearance(viewType) updateGeometry(viewType: viewType) - if let skeletonableView = viewType.view as? Skeletonable { + if let skeletonableView = view as? Skeletonable { geometryChangeObservation = skeletonableView.observeGeometryChange { [weak self] view in self?.updateGeometry(viewType: view.viewType) } } else { - geometryChangeObservation = viewType.view.observe(\.frame, options: [.new]) { [weak self] view, _ in + geometryChangeObservation = view.observe(\.frame, options: [.new]) { [weak self] view, _ in self?.updateGeometry(viewType: view.viewType) } } @@ -155,7 +156,7 @@ open class SkeletonLayer: CAShapeLayer { return } - animationLayer.add(animation, forKey: Constants.animationKeyPath) + animationLayer.add(animation, forKey: Defaults.animationKeyPath) mask = animationLayer } @@ -171,9 +172,9 @@ open class SkeletonLayer: CAShapeLayer { case .parentView(_): configuration.configureContainerAppearance(layer: self) - case .skeletonsHolderView(_): + case let .skeletonsHolderView(view): isSkeletonsHolder = true - configuration.configureBaseViewAppearance(layer: self, view: type.view) + configuration.configureBaseViewAppearance(layer: self, view: view) default: configuration.configureAppearance(layer: self) diff --git a/TIUIElements/TIUIElements.podspec b/TIUIElements/TIUIElements.podspec index 87c023e5..934fce4e 100644 --- a/TIUIElements/TIUIElements.podspec +++ b/TIUIElements/TIUIElements.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIElements' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Bunch of useful protocols and views.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIKitCore/TIUIKitCore.podspec b/TIUIKitCore/TIUIKitCore.podspec index 36b91489..14f09b55 100644 --- a/TIUIKitCore/TIUIKitCore.podspec +++ b/TIUIKitCore/TIUIKitCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIKitCore' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Core UI elements: protocols, views and helpers.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIWebView/TIWebView.podspec b/TIWebView/TIWebView.podspec index c062666e..a87e0688 100644 --- a/TIWebView/TIWebView.podspec +++ b/TIWebView/TIWebView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIWebView' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Universal web view API' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIYandexMapUtils/TIYandexMapUtils.podspec b/TIYandexMapUtils/TIYandexMapUtils.podspec index 397532d8..76145ae9 100644 --- a/TIYandexMapUtils/TIYandexMapUtils.podspec +++ b/TIYandexMapUtils/TIYandexMapUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIYandexMapUtils' - s.version = '1.54.2' + s.version = '1.54.3' s.summary = 'Set of helpers for map objects clustering and interacting using Yandex Maps SDK.' s.homepage = 'https://git.svc.touchin.ru/TouchInstinct/LeadKit/src/tag/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } -- 2.40.1