From 1c80a97fa1781724c35d53a75c9fcb66eb2ec8db Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Thu, 18 Jul 2024 21:06:56 +0400 Subject: [PATCH 1/3] Remove blending gradient --- .../SkeletonUI/Classes/Core/Views/GradientAnimationView.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/SkeletonUI/Classes/Core/Views/GradientAnimationView.swift b/Sources/SkeletonUI/Classes/Core/Views/GradientAnimationView.swift index 5652496..a906a53 100644 --- a/Sources/SkeletonUI/Classes/Core/Views/GradientAnimationView.swift +++ b/Sources/SkeletonUI/Classes/Core/Views/GradientAnimationView.swift @@ -55,7 +55,6 @@ struct GradientAnimationView: View { var body: some View { LinearGradient(gradient: gradient, startPoint: startPoint, endPoint: endPoint) - .blendMode(.screen) .animation(animation, value: isAnimating) .onAppear { isAnimating = true } } From 2b64145ccb8c8efd0769bad0a6c49502274d7dba Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Thu, 18 Jul 2024 21:27:05 +0400 Subject: [PATCH 2/3] Update the masking logic --- .../Classes/Core/ViewModifiers/ShimmerViewModifier.swift | 4 ++-- .../Classes/Core/ViewModifiers/SkeletonViewModifier.swift | 2 +- .../SkeletonUI/Classes/Core/Views/GradientAnimationView.swift | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/SkeletonUI/Classes/Core/ViewModifiers/ShimmerViewModifier.swift b/Sources/SkeletonUI/Classes/Core/ViewModifiers/ShimmerViewModifier.swift index d047f79..5d9aa8d 100644 --- a/Sources/SkeletonUI/Classes/Core/ViewModifiers/ShimmerViewModifier.swift +++ b/Sources/SkeletonUI/Classes/Core/ViewModifiers/ShimmerViewModifier.swift @@ -34,8 +34,8 @@ public struct ShimmerViewModifier: ViewModifier { // MARK: ViewModifier public func body(content: Content) -> some View { - content - .mask(GradientAnimationView(gradient: gradient, animation: animation)) + GradientAnimationView(gradient: gradient, animation: animation) + .mask(content) } } diff --git a/Sources/SkeletonUI/Classes/Core/ViewModifiers/SkeletonViewModifier.swift b/Sources/SkeletonUI/Classes/Core/ViewModifiers/SkeletonViewModifier.swift index 095130a..7d3702a 100644 --- a/Sources/SkeletonUI/Classes/Core/ViewModifiers/SkeletonViewModifier.swift +++ b/Sources/SkeletonUI/Classes/Core/ViewModifiers/SkeletonViewModifier.swift @@ -55,8 +55,8 @@ public struct SkeletonViewModifier: ViewModifier { content(index) .frame(width: (configuration.scales[safe: index] ?? 1) * geometry.size.width) } + .shimmering(isActive: true, gradient: configuration.gradient, animation: configuration.animation) } - .shimmering(isActive: true, gradient: configuration.gradient, animation: configuration.animation) } .padding(configuration.insets) } diff --git a/Sources/SkeletonUI/Classes/Core/Views/GradientAnimationView.swift b/Sources/SkeletonUI/Classes/Core/Views/GradientAnimationView.swift index a906a53..5652496 100644 --- a/Sources/SkeletonUI/Classes/Core/Views/GradientAnimationView.swift +++ b/Sources/SkeletonUI/Classes/Core/Views/GradientAnimationView.swift @@ -55,6 +55,7 @@ struct GradientAnimationView: View { var body: some View { LinearGradient(gradient: gradient, startPoint: startPoint, endPoint: endPoint) + .blendMode(.screen) .animation(animation, value: isAnimating) .onAppear { isAnimating = true } } From 9455a25490b340ed0917970dbaa571f1bf38057a Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Fri, 19 Jul 2024 09:04:31 +0400 Subject: [PATCH 3/3] Update `CHANGELOG.md` --- CHANGELOG.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f395233..9cccc02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,19 @@ # Change Log All notable changes to this project will be documented in this file. -## [Unreleased] +#### 1.x Releases +- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101) | [1.0.2](#102) + +## [1.0.2](https://github.com/space-code/skeleton-ui/releases/tag/1.0.2) +Released on 2024-07-19. #### Added - Add an index to each view - - Added in Pull Request[#5](https://github.com/space-code/skeleton-ui/pull/5). + - Added in Pull Request[#6](https://github.com/space-code/skeleton-ui/pull/6). -#### 1.x Releases -- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101) +#### Updated +- Update the masking logic + - Updated in Pull Request [#7](https://github.com/space-code/skeleton-ui/pull/7). ## [1.0.1](https://github.com/space-code/skeleton-ui/releases/tag/1.0.1) Released on 2024-01-14.