Compare commits

...

4 Commits

Author SHA1 Message Date
Alexander ca7d2edcee Fix "complementaryColor" color isn't changed after updating the application theme (#496) 2022-09-05 09:26:20 +02:00
Juanpe Catalán 3688549eb8 Update Stale action 2022-08-29 08:48:23 +02:00
Juanpe Catalán f27a4f69ff Create needs-attention.yml 2022-08-29 08:40:38 +02:00
Juanpe 2ac515b97e Bump version 1.30.1 2022-08-16 08:36:34 +00:00
7 changed files with 60 additions and 20 deletions
-10
View File
@@ -1,10 +0,0 @@
daysUntilStale: 5
daysUntilClose: 3
onlyLabels:
- awaiting user input
staleLabel: given up
markComment: >
🤖 This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions 🙂
closeComment: false
+18
View File
@@ -0,0 +1,18 @@
name: Issue Needs Attention
# This workflow is triggered on issue comments.
on:
issue_comment:
types: created
jobs:
applyNeedsAttentionLabel:
name: Apply Needs Attention Label
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Apply Needs Attention Label
uses: hramos/needs-attention@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
response-required-label: 'awaiting user info'
needs-attention-label: 'needs triage'
+18
View File
@@ -0,0 +1,18 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 5 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:
close-issue-message: 'Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.'
stale-issue-message: '🤖 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions 🙂'
days-before-stale: 5
days-before-close: 3
enable-statistics: true
operations-per-run: 60
only-labels: 'awaiting user input'
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SkeletonView"
s.version = "1.30.0"
s.version = "1.30.1"
s.summary = "An elegant way to show users that something is happening and also prepare them to which contents he is waiting"
s.description = <<-DESC
Today almost all apps have async processes, as API requests, long runing processes, etc. And while the processes are working, usually developers place a loading view to show users that something is going on.
@@ -28,12 +28,12 @@ struct SkeletonLayer {
self.maskLayer.bounds = holder.definedMaxBounds
self.maskLayer.cornerRadius = CGFloat(holder.skeletonCornerRadius)
addTextLinesIfNeeded()
self.maskLayer.tint(withColors: colors)
self.maskLayer.tint(withColors: colors, traitCollection: holder.traitCollection)
}
func update(usingColors colors: [UIColor]) {
layoutIfNeeded()
maskLayer.tint(withColors: colors)
maskLayer.tint(withColors: colors, traitCollection: holder?.traitCollection)
}
func layoutIfNeeded() {
@@ -15,11 +15,15 @@ import UIKit
extension CAGradientLayer {
override func tint(withColors colors: [UIColor]) {
override func tint(withColors colors: [UIColor], traitCollection: UITraitCollection?) {
skeletonSublayers.recursiveSearch(leafBlock: {
self.colors = colors.map { $0.cgColor }
if #available(iOS 13.0, tvOS 13, *), let traitCollection = traitCollection {
self.colors = colors.map { $0.resolvedColor(with: traitCollection).cgColor }
} else {
self.colors = colors.map { $0.cgColor }
}
}) {
$0.tint(withColors: colors)
$0.tint(withColors: colors, traitCollection: traitCollection)
}
}
@@ -35,11 +39,15 @@ extension CALayer {
return sublayers?.filter { $0.name == Constants.skeletonSubLayersName } ?? [CALayer]()
}
@objc func tint(withColors colors: [UIColor]) {
@objc func tint(withColors colors: [UIColor], traitCollection: UITraitCollection?) {
skeletonSublayers.recursiveSearch(leafBlock: {
backgroundColor = colors.first?.cgColor
if #available(iOS 13.0, tvOS 13, *), let traitCollection = traitCollection {
backgroundColor = colors.first?.resolvedColor(with: traitCollection).cgColor
} else {
backgroundColor = colors.first?.cgColor
}
}) {
$0.tint(withColors: colors)
$0.tint(withColors: colors, traitCollection: traitCollection)
}
}
@@ -43,7 +43,13 @@ public extension UIColor {
}
var complementaryColor: UIColor {
isLight ? darker : lighter
if #available(iOS 13, tvOS 13, *) {
return UIColor { _ in
self.isLight ? self.darker : self.lighter
}
} else {
return isLight ? darker : lighter
}
}
var lighter: UIColor {