Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ca7d2edcee | |||
| 3688549eb8 | |||
| f27a4f69ff | |||
| 2ac515b97e | |||
| 969f068480 | |||
| fbc2e6f8d2 | |||
| 8be6c81729 | |||
| 87c4706be8 | |||
| b4d6dc2602 |
@@ -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
|
||||
@@ -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'
|
||||
@@ -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'
|
||||
@@ -2,13 +2,8 @@
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "1.000",
|
||||
"green" : "1.000",
|
||||
"red" : "1.000"
|
||||
}
|
||||
"platform" : "universal",
|
||||
"reference" : "systemBlueColor"
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// swift-tools-version:5.0
|
||||
// swift-tools-version:5.3
|
||||
|
||||
import PackageDescription
|
||||
|
||||
|
||||
@@ -90,6 +90,10 @@ dependencies: [
|
||||
]
|
||||
```
|
||||
|
||||
> 📣 **IMPORTANT!**
|
||||
>
|
||||
> Since version 1.30.0, `SkeletonView` supports **XCFrameworks**, so if you want to install it as a **XCFramework**, please use [this repo](https://github.com/Juanpe/SkeletonView-XCFramework.git) instead.
|
||||
|
||||
|
||||
## 🐒 Usage
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "SkeletonView"
|
||||
s.version = "1.29.4"
|
||||
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() {
|
||||
|
||||
@@ -21,7 +21,18 @@ extension UITableView {
|
||||
// Some developer trying to call `view.showAnimatedSkeleton()`
|
||||
// when the request or data is loading which sometimes happens before the ViewDidAppear
|
||||
guard window != nil else { return [] }
|
||||
return subviews
|
||||
|
||||
var result = [UIView]()
|
||||
|
||||
for subview in subviews {
|
||||
if String(describing: type(of: subview)) == "UITableViewWrapperView" {
|
||||
result.append(contentsOf: subview.subviews)
|
||||
} else {
|
||||
result.append(subview)
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user