### Installation with Carthage Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Add the SkeletonView dependency to your Cartfile for installation using Carthage. ```bash github "Juanpe/SkeletonView" ``` -------------------------------- ### CocoaPods Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md Instructions for installing SkeletonView using CocoaPods. This involves adding the dependency to your Podfile and then running the install command. ```ruby pod "SkeletonView" ``` -------------------------------- ### Carthage Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md Instructions for installing SkeletonView using Carthage. This involves adding the repository to your Cartfile and then building the framework. ```bash github "Juanpe/SkeletonView" ``` -------------------------------- ### Skeleton Tree Description Example Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md An example of the output from `sk.skeletonTreeDescription` when the debug mode is enabled. ```swift { "type" : "UIView", // UITableView, UILabel... "isSkeletonable" : true, "reference" : "0x000000014751ce30", ``` -------------------------------- ### Carthage Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_pt-br.md Instructions for installing SkeletonView using Carthage. Add the SkeletonView GitHub repository to your Cartfile. ```bash github "Juanpe/SkeletonView" ``` -------------------------------- ### CocoaPods Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_pt-br.md Instructions for installing SkeletonView using CocoaPods. Add the 'SkeletonView' pod to your Podfile. ```ruby pod "SkeletonView" ``` -------------------------------- ### Carthage Installation Source: https://github.com/juanpe/skeletonview/blob/main/README.md Instructions for installing SkeletonView using Carthage, a decentralized dependency manager for macOS and iOS. ```ruby github "Juanpe/SkeletonView" ``` -------------------------------- ### Showing Skeleton Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md Example of how to initiate the skeleton view display on a container view. ```swift view.showSkeleton() ``` -------------------------------- ### XCFramework Installation Note Source: https://github.com/juanpe/skeletonview/blob/main/README.md Information regarding the installation of SkeletonView as an XCFramework, directing users to a separate repository for this specific build. ```swift > 📣 **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. ``` -------------------------------- ### Carthage Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Instructions for installing SkeletonView using Carthage. This involves adding the SkeletonView GitHub repository to your Cartfile. ```bash github "Juanpe/SkeletonView" ``` -------------------------------- ### Installation with CocoaPods Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Add the SkeletonView dependency to your Podfile for installation using CocoaPods. ```ruby pod "SkeletonView" ``` -------------------------------- ### XCFramework Installation Note Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md This note informs users about the availability of SkeletonView as an XCFramework for easier integration, directing them to a separate repository for installation. ```markdown > 📣 **WICHTIG!** > > Seit Version 1.30.0 unterstützt `SkeletonView` **XCFrameworks**, wenn du es also als **XCFramework** installieren möchtest, verwende bitte stattdessen [dieses Repo](https://github.com/Juanpe/SkeletonView-XCFramework.git). ``` -------------------------------- ### CocoaPods Installation Source: https://github.com/juanpe/skeletonview/blob/main/README.md Instructions for installing SkeletonView using CocoaPods, a dependency manager for Swift and Objective-C projects. ```ruby pod 'SkeletonView' ``` -------------------------------- ### CocoaPods Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Instructions for installing SkeletonView using CocoaPods. This involves adding the 'SkeletonView' pod to your Podfile. ```ruby pod "SkeletonView" ``` -------------------------------- ### Install Xcode Command Line Tools Source: https://github.com/juanpe/skeletonview/blob/main/fastlane/README.md Installs the latest version of the Xcode command line tools, which is a prerequisite for using fastlane. ```sh xcode-select --install ``` -------------------------------- ### CocoaPods Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md This snippet shows how to install SkeletonView using CocoaPods, a dependency manager for Swift and Objective-C projects. ```ruby pod 'SkeletonView' ``` -------------------------------- ### Import SkeletonView Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Import the SkeletonView library into your Swift file to start using its features. ```swift import SkeletonView ``` -------------------------------- ### Install SkeletonView with Carthage Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md This snippet demonstrates how to integrate SkeletonView into your project using the Carthage dependency manager. Carthage builds frameworks that you can then drag into your Xcode project. ```bash github "Juanpe/SkeletonView" ``` -------------------------------- ### Swift Package Manager Installation Source: https://github.com/juanpe/skeletonview/blob/main/README.md Instructions for installing SkeletonView using Swift Package Manager (SPM), the official dependency manager for Swift. ```swift dependencies: [ .package(url: "https://github.com/Juanpe/SkeletonView.git", from: "1.7.0") ] ``` -------------------------------- ### Import SkeletonView Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_pt-br.md Import the SkeletonView library into your Swift file to start using its features. ```swift import SkeletonView ``` -------------------------------- ### Import SkeletonView Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md Import the SkeletonView library into your Swift file to start using its features. ```swift import SkeletonView ``` -------------------------------- ### Carthage Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md This snippet demonstrates how to integrate SkeletonView into your project using Carthage, a decentralized dependency manager for macOS and iOS. ```bash github "Juanpe/SkeletonView" ``` -------------------------------- ### Installation with Swift Package Manager Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Include SkeletonView as a dependency in your Swift Package Manager configuration. ```swift dependencies: [ .package(url: "https://github.com/Juanpe/SkeletonView.git", from: "1.6") ] ``` -------------------------------- ### Displaying Skeleton Loading Animations Source: https://github.com/juanpe/skeletonview/blob/main/README.md Provides examples of the four different methods to display skeleton loading effects: solid, gradient, solid animated, and gradient animated. ```swift view.showSkeleton() // Solid view.showGradientSkeleton() // Gradient view.showAnimatedSkeleton() // Solid animated view.showAnimatedGradientSkeleton() // Gradient animated ``` -------------------------------- ### UITableView Cell Identifier Example Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md An example implementation of the required `collectionSkeletonView(_:cellIdentifierForRowAt:)` method for UITableView. ```swift func collectionSkeletonView(_ skeletonView : UITableView, cellIdentifierForRowAt indexPath : IndexPath) -> ReusableCellIdentifier { return "CellIdentifier". } ``` -------------------------------- ### Install SkeletonView with CocoaPods Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md This snippet shows how to add SkeletonView to your project using the CocoaPods dependency manager. Ensure you have CocoaPods installed and configured for your project. ```ruby pod 'SkeletonView' ``` -------------------------------- ### UITableView Skeleton Example Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Example implementation of the `collectionSkeletonView(_:cellIdentifierForRowAt:)` method for providing a cell identifier in a UITableView skeleton. ```swift func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier { return "CellIdentifier" } ``` -------------------------------- ### SkeletonView Structure Example Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md This JSON snippet illustrates the hierarchical structure of views within SkeletonView, indicating a UIView with specific properties like `isSkeletonable` and a `reference`. ```json { "children" : [ { "type" : "UIView", "isSkeletonable" : true, "children" : [ ... ], "reference" : "0x000000014751cfa0" } ] } ``` -------------------------------- ### UITableView Cell Identifier Example Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md Example implementation for the required `collectionSkeletonView(_:cellIdentifierForRowAt:)` method in `SkeletonTableViewDataSource`. ```swift func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier { return "CellIdentifier" } ``` -------------------------------- ### Swift Package Manager Installation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md This snippet illustrates how to add SkeletonView as a dependency using the Swift Package Manager, Apple's official tool for managing dependencies in Swift projects. ```swift dependencies: [ .package(url: "https://github.com/Juanpe/SkeletonView.git", from: "1.7.0") ] ``` -------------------------------- ### Install SkeletonView with Swift Package Manager Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md This snippet illustrates how to add SkeletonView as a dependency to your project using Swift Package Manager. This is the recommended approach for managing dependencies in modern Swift projects. ```swift dependencies: [ .package(url: "https://github.com/Juanpe/SkeletonView.git", from: "1.7.0") ] ``` -------------------------------- ### UITableView Prepare Skeleton Cell Source: https://github.com/juanpe/skeletonview/blob/main/README.md Example implementation for preparing a dequeued cell for SkeletonView display in UITableView. ```swift func collectionSkeletonView(_ skeletonView: UITableView, prepareCellForSkeleton cell: UITableViewCell, at indexPath: IndexPath) { let cell = cell as? Cell cell?.textField.isHidden = indexPath.row == 0 } ``` -------------------------------- ### Sliding Animation with SkeletonAnimationBuilder Source: https://github.com/juanpe/skeletonview/blob/main/README.md Demonstrates creating a sliding animation for gradients using SkeletonAnimationBuilder. It allows specifying the direction and duration of the animation. The example shows how to apply this animation to a gradient skeleton. ```swift // func makeSlidingAnimation(withDirection direction: GradientDirection, duration: CFTimeInterval = 1.5) -> SkeletonLayerAnimation let animation = SkeletonAnimationBuilder().makeSlidingAnimation(withDirection: .leftToRight) view.showAnimatedGradientSkeleton(usingGradient: gradient, animation: animation) ``` -------------------------------- ### UITableView Custom Skeleton Cell Source: https://github.com/juanpe/skeletonview/blob/main/README.md Example implementation for customizing a skeleton cell before it's displayed in UITableView. ```swift func collectionSkeletonView(_ skeletonView: UITableView, skeletonCellForRowAt indexPath: IndexPath) -> UITableViewCell? { let cell = skeletonView.dequeueReusableCell(withIdentifier: "CellIdentifier", for: indexPath) as? Cell cell?.textField.isHidden = indexPath.row == 0 return cell } ``` -------------------------------- ### UITableView Skeleton Cell Identifier Implementation Source: https://github.com/juanpe/skeletonview/blob/main/README.md Example implementation of the required method to provide a cell identifier for SkeletonView in UITableView. ```swift func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier { return "CellIdentifier" } ``` -------------------------------- ### Showing Skeletons Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Demonstrates the different methods to display skeleton loading screens. ```swift (1) view.showSkeleton() // Solid (2) view.showGradientSkeleton() // Gradient (3) view.showAnimatedSkeleton() // Solid animated (4) view.showAnimatedGradientSkeleton() // Gradient animated ``` -------------------------------- ### Basic SkeletonView Usage Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md Demonstrates the basic steps to implement SkeletonView in Swift. This includes importing the library, marking a view as skeletonable, and showing different types of skeleton effects. ```swift import SkeletonView // Using pure code: avatarImageView.isSkeletonable = true // Using IB/Storyboards: // (Requires setting the 'isSkeletonable' property in the Identity Inspector) // Showing skeleton effects: view.showSkeleton() // Solid view.showGradientSkeleton() // Gradient view.showAnimatedSkeleton() // Solid animated view.showAnimatedGradientSkeleton() // Gradient animated ``` -------------------------------- ### Show Skeleton Source: https://github.com/juanpe/skeletonview/blob/main/README.md Initiates the skeleton view display. This is the primary method to show the skeleton. ```swift view.showSkeleton() ``` -------------------------------- ### SkeletonView API Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Overview of key methods and properties for using SkeletonView. ```apidoc SkeletonView: isSkeletonable: Bool - Determines if a view can display a skeleton. showSkeleton(transition: SkeletonTransitionStyle = .none) - Displays a solid skeleton. - transition: The transition style for showing the skeleton. showGradientSkeleton(transition: SkeletonTransitionStyle = .none) - Displays a gradient skeleton. - transition: The transition style for showing the skeleton. showAnimatedSkeleton(transition: SkeletonTransitionStyle = .none) - Displays an animated solid skeleton. - transition: The transition style for showing the skeleton. showAnimatedGradientSkeleton(transition: SkeletonTransitionStyle = .none) - Displays an animated gradient skeleton. - transition: The transition style for showing the skeleton. hideSkeleton(transition: SkeletonTransitionStyle = .none) - Hides the skeleton and shows the original view content. - transition: The transition style for hiding the skeleton. updateSkeleton() - Updates the solid skeleton's appearance. updateGradientSkeleton() - Updates the gradient skeleton's appearance. updateAnimatedSkeleton() - Updates the animated solid skeleton's appearance. updateAnimatedGradientSkeleton() - Updates the animated gradient skeleton's appearance. layoutSkeletonIfNeeded() - Manually triggers a layout update for the skeleton. Use with caution, as it's often automatic. SkeletonTransitionStyle: - none: No transition. - fade(withDuration: TimeInterval = 0.25): Fade transition. - spring(withStiffness: Float = 0.7, damping: Float = 0.8, initialVelocity: Float = 0.0): Spring animation transition. - blur: - custom(animation: @escaping () -> Void): Collections (UITableView & UICollectionView): - SkeletonView provides extensions for UITableView and UICollectionView to easily apply skeletons to cells and headers/footers. ``` -------------------------------- ### Skeleton Debugging Property Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md A property available on UIView to get detailed information about its skeleton state, useful for debugging. ```swift var skeletonDescription : String ``` -------------------------------- ### SkeletonView Contribution Guidelines Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md Encourages open-source contributions to SkeletonView, detailing how users can contribute by opening issues, providing feedback via email, or submitting pull requests with their own fixes and suggestions. ```markdown ## ❤️ 特约 这是一个开源项目,所以请随时贡献。怎么样? - 打开一个 [issue](https://github.com/Juanpe/SkeletonView/issues/new) - 反馈通过发送 [email](mailto://juanpecatalan.com) - 提出您自己的修复和建议,并带有拉取的请求。 查看 [所有贡献者](https://github.com/Juanpe/SkeletonView/graphs/contributors) ``` -------------------------------- ### Showing Skeleton Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Initiates the skeleton loading animation for a view. This is the primary method to display the skeleton. ```swift view.showSkeleton() ``` -------------------------------- ### Import SkeletonView Source: https://github.com/juanpe/skeletonview/blob/main/README.md This snippet shows how to import the SkeletonView library into your Swift project. ```swift import SkeletonView ``` -------------------------------- ### SkeletonView Author Information Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md Provides information about the author of SkeletonView, Juanpe Catalán, including a link to their Twitter profile and a 'Buy me a coffee' link for support. ```markdown ## 👨🏻‍💻 作者 [1.1]: http://i.imgur.com/tXSoThF.png [1]: http://www.twitter.com/JuanpeCatalan * Juanpe Catalán [![alt text][1.1]][1] Buy me a coffee ``` -------------------------------- ### Import SkeletonView Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Import the SkeletonView library into your Swift project to access its functionalities. ```swift import SkeletonView ``` -------------------------------- ### Import SkeletonView Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Importing the SkeletonView library into your Swift code. ```swift import SkeletonView ``` -------------------------------- ### SkeletonView Future Development Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md Lists the planned features and improvements for SkeletonView, including support for multi-line elements, gradient animations, resizable cells, CollectionView and tvOS compatibility, and state restoration. ```markdown ## 📬 下一步 * [x] 设置多行元素中最后一行的填充百分比 * [x] 添加更多渐变动画 * [x] 支持可调整大小的单元 * [x] CollectionView 兼容 * [x] tvOS 兼容 * [x] 添加恢复状态 * [ ] 自定义集合兼容 * [ ] 在显示/隐藏骨架时添加动画 * [ ] MacOS 和 WatchOS兼容 ``` -------------------------------- ### Skeleton Transitions Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Illustrates how to apply smooth transitions when showing or hiding skeleton views. Supports transitions like cross-dissolve with customizable durations. ```swift view.showSkeleton(transition : .crossDissolve(0.25)) // Show skeleton transition with cross dissolve and 0.25s fade time view.hideSkeleton(transition : .crossDissolve(0.25)) // Hide skeleton transition with cross dissolve and 0.25s fade time ``` -------------------------------- ### Enabling Skeleton Debug Mode Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md Instructions on how to enable debug mode for SkeletonView by setting an environment variable. ```swift SKELETON_DEBUG ``` -------------------------------- ### Run bump_version Action Source: https://github.com/juanpe/skeletonview/blob/main/fastlane/README.md Executes the bump_version action within fastlane. The 'bundle exec' prefix is optional and used when managing gems with Bundler. ```sh [bundle exec] fastlane bump_version ``` -------------------------------- ### License Information Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_pt-br.md This section details the MIT License under which the SkeletonView project is distributed. It outlines the permissions and conditions for using, copying, modifying, merging, publishing, distributing, sublicensing, and/or selling copies of the software. ```text MIT License Copyright (c) 2017 Juanpe Catalán Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -------------------------------- ### Display Skeleton Loading Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_pt-br.md Initiate the skeleton loading animation on a view. There are four options: solid, gradient, solid animated, and gradient animated. ```swift view.showSkeleton() // Solid view.showGradientSkeleton() // Gradient view.showAnimatedSkeleton() // Solid animated view.showAnimatedGradientSkeleton() // Gradient animated ``` -------------------------------- ### Skeleton View Transitions Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Illustrates how to apply transition effects when showing or hiding SkeletonViews. The `transition` parameter can be set with various animation types, such as `crossDissolve`, and a duration for the transition effect. ```swift view.showSkeleton(transition: .crossDissolve(0.25)) // Fade in the Skeleton with cross dissolve transition with 0.25 seconds transition duration view.hideSkeleton(transition: .crossDissolve(0.25)) // Fade out the Skeleton with cross dissolve transition with 0.25 seconds transition duration ``` -------------------------------- ### Showing Skeleton with Custom Animation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Demonstrates how to display a skeleton view with a custom animation. It takes a closure that accepts a CALayer and returns a CAAnimation, allowing for fine-grained control over the animation's properties. ```swift view.showAnimatedSkeleton { (layer) -> CAAnimation in let animation = CAAnimation() // Customize your animation here return animation } ``` -------------------------------- ### Displaying Skeletons Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md Show different types of skeleton loading screens on your views. Options include solid, gradient, animated solid, and animated gradient skeletons. ```swift view.showSkeleton() // Solid view.showGradientSkeleton() // Gradient view.showAnimatedSkeleton() // Animated Solid view.showAnimatedGradientSkeleton() // Animated Gradient ``` -------------------------------- ### Skeleton Debugging Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Provides debugging tools for SkeletonView. Includes a description of the skeleton tree and a debug mode. ```swift var sk.skeletonTreeDescription: String // Enable debug mode by adding the environment variable SKELETON_DEBUG ``` -------------------------------- ### Basic Skeleton View Usage Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md This snippet shows a basic implementation of SkeletonView in Swift, demonstrating how to apply a skeleton effect to a UIView. It highlights the `isSkeletonable` property and the `showSkeleton()` method. ```swift import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let myView = UIView() myView.isSkeletonable = true view.addSubview(myView) myView.showSkeleton() } } ``` -------------------------------- ### Marking Views as Skeletonable Source: https://github.com/juanpe/skeletonview/blob/main/README.md Demonstrates how to designate specific UI elements as skeletonable, either programmatically or via Interface Builder. ```swift avatarImageView.isSkeletonable = true ``` -------------------------------- ### Run release_current Action Source: https://github.com/juanpe/skeletonview/blob/main/fastlane/README.md Executes the release_current action within fastlane. The 'bundle exec' prefix is optional and used when managing gems with Bundler. ```sh [bundle exec] fastlane release_current ``` -------------------------------- ### Skeleton Transitions Source: https://github.com/juanpe/skeletonview/blob/main/README.md Illustrates how to apply built-in transitions, such as cross-dissolve, to SkeletonView's show and hide functions. This allows for smoother visual changes when skeletons appear or disappear, with a customizable fade time. ```swift view.showSkeleton(transition: .crossDissolve(0.25)) //Show skeleton cross dissolve transition with 0.25 seconds fade time view.hideSkeleton(transition: .crossDissolve(0.25)) //Hide skeleton cross dissolve transition with 0.25 seconds fade time ``` -------------------------------- ### SkeletonView Debugging Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Provides information on debugging SkeletonView, including accessing skeleton information via `skeletonDescription` and enabling a debug mode using the `SKELETON_DEBUG` environment variable for console output. ```swift var skeletonDescription: String // To enable debug mode, set the environment variable SKELETON_DEBUG ``` -------------------------------- ### Custom Skeleton Colors Source: https://github.com/juanpe/skeletonview/blob/main/README.md Demonstrates how to apply custom solid colors or gradients to SkeletonView instances. ```swift view.showSkeleton(usingColor: UIColor.gray) // Solid view.showSkeleton(usingColor: UIColor(red: 25.0, green: 30.0, blue: 255.0, alpha: 1.0)) ``` ```swift let gradient = SkeletonGradient(baseColor: UIColor.midnightBlue) view.showGradientSkeleton(usingGradient: gradient) // Gradient ``` -------------------------------- ### MIT License Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology in the year 1985. It is a short and simple license that allows people to do whatever they want with the code, as long as they include the original copyright and license notice in any copy of the software. ```license MIT License Copyright (c) 2017 Juanpe Catalán Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -------------------------------- ### Updating Skeleton Configuration Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Methods to update the appearance and animation of existing skeletons. ```swift (1) view.updateSkeleton() // Solid (2) view.updateGradientSkeleton() // Gradient (3) view.updateAnimatedSkeleton() // Solid animated (4) view.updateAnimatedGradientSkeleton() // Gradient animated ``` -------------------------------- ### Showing Skeleton Animation Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md This code snippet demonstrates how to display a skeleton loading animation on a UIView. It's typically called when data is being fetched. ```swift view.showSkeleton() ``` -------------------------------- ### Swift Package Manager Dependency Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md How to add SkeletonView as a dependency in your Swift package using Package.swift. ```swift dependencies: [ .package(url: "https://github.com/Juanpe/SkeletonView.git", from: "1.7.0") ] ``` -------------------------------- ### SkeletonTableViewDataSource Protocol Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Implement the `SkeletonTableViewDataSource` protocol to enable skeleton loading for UITableView. This protocol inherits from `UITableViewDataSource` and requires specific methods for defining the skeleton structure. ```APIDOC public protocol SkeletonTableViewDataSource: UITableViewDataSource { func numSections(in collectionSkeletonView: UITableView) -> Int func collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier } // Default implementations: // numSections(in collectionSkeletonView: UITableView) -> Int // Default: 1 // collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int // Default: Calculates the number of cells needed to fill the table view. // collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier // This method is optional and used when you need to provide a specific cell identifier. ``` -------------------------------- ### Display Skeletons Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Show different types of skeleton loading animations on your views. Options include solid color, gradient, and animated versions of both. ```swift view.showSkeleton() // Solid color view.showGradientSkeleton() // Gradient view.showAnimatedSkeleton() // Animated solid color view.showAnimatedGradientSkeleton() // Animated gradient ``` -------------------------------- ### MIT License Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology. It allows users to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software. ```text MIT License Copyright (c) 2017 Juanpe Catalán Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -------------------------------- ### UICollectionView Skeleton Data Source Source: https://github.com/juanpe/skeletonview/blob/main/README.md Defines the protocol for UICollectionView data sources to enable skeleton loading. It includes methods for specifying the number of sections and items, cell and supplementary view identifiers, and custom skeleton cells/views. ```swift public protocol SkeletonCollectionViewDataSource: UICollectionViewDataSource { func numSections(in collectionSkeletonView: UICollectionView) -> Int // default: 1 func collectionSkeletonView(_ skeletonView: UICollectionView, numberOfItemsInSection section: Int) -> Int func collectionSkeletonView(_ skeletonView: UICollectionView, cellIdentifierForItemAt indexPath: IndexPath) -> ReusableCellIdentifier func collectionSkeletonView(_ skeletonView: UICollectionView, supplementaryViewIdentifierOfKind: String, at indexPath: IndexPath) -> ReusableCellIdentifier? // default: nil func collectionSkeletonView(_ skeletonView: UICollectionView, skeletonCellForItemAt indexPath: IndexPath) -> UICollectionViewCell? // default: nil func collectionSkeletonView(_ skeletonView: UICollectionView, prepareCellForSkeleton cell: UICollectionViewCell, at indexPath: IndexPath) func collectionSkeletonView(_ skeletonView: UICollectionView, prepareViewForSkeleton view: UICollectionReusableView, at indexPath: IndexPath) } ``` -------------------------------- ### MIT License Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology in the year 1985. As a permissive license, it lets people do practically whatever they want with the code, including distributing it as part of a commercial product, modifying it, and using it for other purposes. ```text MIT License Copyright (c) 2017 Juanpe Catalán Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -------------------------------- ### UITableView Skeleton Delegate Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Defines the protocol for UITableView delegates to enable skeleton loading for headers and footers. It requires methods for providing supplementary view identifiers. ```swift public protocol SkeletonTableViewDelegate: UITableViewDelegate { func collectionSkeletonView(_ skeletonView: UITableView, identifierForHeaderInSection section: Int) -> ReusableHeaderFooterIdentifier? // standard: nil func collectionSkeletonView(_ skeletonView: UITableView, identifierForFooterInSection section: Int) -> ReusableHeaderFooterIdentifier? // standard: nil } ``` -------------------------------- ### Custom Colors for Skeleton Views Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Demonstrates how to set custom colors for skeleton views using solid colors or gradients. Supports basic colors and custom UIColor definitions. ```swift view.showSkeleton(usingColor: UIColor.gray) // Solid // or view.showSkeleton(usingColor: UIColor(red: 25.0, green: 30.0, blue: 255.0, alpha: 1.0)) let gradient = SkeletonGradient(baseColor: UIColor.midnightBlue) view.showGradientSkeleton(usingGradient: gradient) // Gradient ``` -------------------------------- ### Customizing Skeleton Appearance Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_ko.md Explains how to customize the default appearance of SkeletonView, including tint color, gradient, multiline height, spacing, and corner radius. Changes can be applied globally. ```swift SkeletonAppearance.default.multilineHeight = 20 SkeletonAppearance.default.tintColor = .green ``` -------------------------------- ### Default Appearance Configuration Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Explains how to configure default appearance properties for SkeletonView, including tint color, gradient, multiline properties, and corner radius. These defaults are applied when no specific properties are provided. ```swift SkeletonAppearance.default.multilineHeight = 20 SkeletonAppearance.default.tintColor = .green ``` -------------------------------- ### SkeletonTableViewDelegate Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md Implement the `SkeletonTableViewDelegate` protocol to display skeletons in UITableView headers and footers. This protocol extends `UITableViewDelegate` and provides methods for specifying reusable identifiers for headers and footers. ```APIDOC public protocol SkeletonTableViewDelegate: UITableViewDelegate { func collectionSkeletonView(_ skeletonView: UITableView, identifierForHeaderInSection section: Int) -> ReusableHeaderFooterIdentifier? // default: nil func collectionSkeletonView(_ skeletonView: UITableView, identifierForFooterInSection section: Int) -> ReusableHeaderFooterIdentifier? // default: nil } ``` -------------------------------- ### Custom Colors and Gradients Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Demonstrates how to set custom solid colors or gradients for skeleton views. Supports solid colors using UIColor and gradients using SkeletonGradient. ```swift view.showSkeleton(usingColor : UIColor.gray) // Solid // or view.showSkeleton(usingColor : UIColor(red : 25.0, green : 30.0, blue : 255.0, alpha : 1.0)) let gradient = SkeletonGradient(baseColor : UIColor.midnightBlue) view.showGradientSkeleton(usingGradient : gradient) // Gradient ``` -------------------------------- ### UITableView Skeleton Data Source Source: https://github.com/juanpe/skeletonview/blob/main/README.md Defines the protocol for UITableView data sources to enable skeleton loading. It includes methods for specifying the number of sections and rows, cell identifiers, and custom skeleton cells. ```swift public protocol SkeletonTableViewDataSource: UITableViewDataSource { func numSections(in collectionSkeletonView: UITableView) -> Int // Default: 1 func collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier func collectionSkeletonView(_ skeletonView: UITableView, skeletonCellForRowAt indexPath: IndexPath) -> UITableViewCell? // Default: nil func collectionSkeletonView(_ skeletonView: UITableView, prepareCellForSkeleton cell: UITableViewCell, at indexPath: IndexPath) } ``` -------------------------------- ### Skeleton Text Properties Source: https://github.com/juanpe/skeletonview/blob/main/README.md Configures the appearance of multiline text skeletons, including fill percentage, corner radius, line spacing, padding, line height, and number of lines. ```swift descriptionTextView.lastLineFillPercent = 50 descriptionTextView.linesCornerRadius = 5 ``` ```swift label.skeletonTextNumberOfLines = 3 // .custom(3) ``` ```swift descriptionTextView.skeletonTextLineHeight = .relativeToFont ``` -------------------------------- ### SkeletonView MIT License Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md The full text of the MIT License, which governs the use and distribution of the SkeletonView software. It grants broad permissions for use, modification, and distribution, with the condition that the original copyright and license notices are included. ```license ## 👮🏻 许可证 ``` MIT License Copyright (c) 2017 Juanpe Catalán Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` ``` -------------------------------- ### SkeletonView Recursive Loading Concept Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md Explains the recursive nature of SkeletonView and how to control it by marking views as 'Skeletonable'. Setting a view as Skeletonable stops the recursive search for child views when the skeleton is not Skeletonable, optimizing performance. ```markdown ### 👨‍👧‍👦 等级制度 由于 ```SkeletonView``` 是递归的,我们希望 skeleton 效率高效, 我们希望尽快停止递归。因此,您必须将容器视图设置为 `Skeletonable` ,因为`skeletonable` 一旦视图不是 Skeletonable, Skeleton 将停止查找子视图,然后断开递归。 一图胜千言: > 设置 ```ìsSkeletonable```= ☠️ | 分组 | 结果 |------- | ------- |![](../Assets/no_skeletonable.png) | ![](../Assets/no_skeletonables_result.png) |![](../Assets/container_no_skeletonable.png) | ![](../Assets/no_skeletonables_result.png) |![](../Assets/container_skeletonable.png) | ![](../Assets/container_skeletonable_result.png) |![](../Assets/all_skeletonables.png) | ![](../Assets/all_skeletonables_result.png) ``` -------------------------------- ### UICollectionView Skeleton Data Source Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Defines the protocol for UICollectionView data sources to enable skeleton loading. It requires methods for specifying sections, items per section, cell identifiers, supplementary view identifiers, and custom skeleton cells. ```swift public protocol SkeletonCollectionViewDataSource: UICollectionViewDataSource { func numSections(in collectionSkeletonView: UICollectionView) -> Int // standard: 1 func collectionSkeletonView(_ skeletonView: UICollectionView, numberOfItemsInSection section: Int) -> Int func collectionSkeletonView(_ skeletonView: UICollectionView, cellIdentifierForItemAt indexPath: IndexPath) -> ReusableCellIdentifier func collectionSkeletonView(_ skeletonView: UICollectionView, supplementaryViewIdentifierOfKind: String, at indexPath: IndexPath) -> ReusableCellIdentifier? // standard: nil func collectionSkeletonView(_ skeletonView: UICollectionView, skeletonCellForItemAt indexPath: IndexPath) -> UICollectionViewCell? // standard: nil func collectionSkeletonView(_ skeletonView: UICollectionView, prepareCellForSkeleton cell: UICollectionViewCell, at indexPath: IndexPath) } ``` -------------------------------- ### SkeletonView Mentions Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_zh.md A list of mentions and features of SkeletonView in various iOS development newsletters, articles, and platforms, highlighting its popularity and recognition within the community. ```markdown ## 📢 提及 - [iOS Dev Weekly #327](https://iosdevweekly.com/issues/327#start) - [Hacking with Swift Articles](https://www.hackingwithswift.com/articles/40/skeletonview-makes-loading-content-beautiful) - [Top 10 Swift Articles November](https://medium.mybridge.co/swift-top-10-articles-for-the-past-month-v-nov-2017-dfed7861cd65) - [30 Amazing iOS Swift Libraries (v2018)](https://medium.mybridge.co/30-amazing-ios-swift-libraries-for-the-past-year-v-2018-7cf15027eee9) - [AppCoda Weekly #44](http://digest.appcoda.com/issues/appcoda-weekly-issue-44-81899) - [iOS Cookies Newsletter #103](https://us11.campaign-archive.com/?u=cd1f3ed33c6527331d82107ba&id=48131a516d) - [Swift Developments Newsletter #113](https://andybargh.com/swiftdevelopments-113/) - [iOS Goodies #204](http://ios-goodies.com/post/167557280951/week-204) - [Swift Weekly #96](http://digest.swiftweekly.com/issues/swift-weekly-issue-96-81759) - [CocoaControls](https://www.cocoacontrols.com/controls/skeletonview) - [Awesome iOS Newsletter #74](https://ios.libhunt.com/newsletter/74) ``` -------------------------------- ### MIT License Source: https://github.com/juanpe/skeletonview/blob/main/README.md The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology. It allows software to be freely used, modified, and distributed. ```text MIT License Copyright (c) 2017 Juanpe Catalán Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -------------------------------- ### UITableView Skeleton Data Source Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_de.md Defines the protocol for UITableView data sources to enable skeleton loading. It requires methods for specifying the number of sections, rows per section, cell identifiers, and custom skeleton cells. ```swift public protocol SkeletonTableViewDataSource: UITableViewDataSource { func numSections(in collectionSkeletonView: UITableView) -> Int // Standard: 1 func collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier func collectionSkeletonView(_ skeletonView: UITableView, skeletonCellForRowAt indexPath: IndexPath) -> UITableViewCell? // Standard: nil func collectionSkeletonView(_ skeletonView: UITableView, prepareCellForSkeleton cell: UITableViewCell, at indexPath: IndexPath) } ``` -------------------------------- ### UITableView Skeleton Delegate Source: https://github.com/juanpe/skeletonview/blob/main/README.md Defines the protocol for UITableView delegates to enable skeleton loading for headers and footers. It allows specifying reusable identifiers for skeleton headers and footers. ```swift public protocol SkeletonTableViewDelegate: UITableViewDelegate { func collectionSkeletonView(_ skeletonView: UITableView, identifierForHeaderInSection section: Int) -> ReusableHeaderFooterIdentifier? // default: nil func collectionSkeletonView(_ skeletonView: UITableView, identifierForFooterInSection section: Int) -> ReusableHeaderFooterIdentifier? // default: nil } ``` -------------------------------- ### SkeletonTableViewDataSource Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md Implement the `SkeletonTableViewDataSource` protocol to enable skeleton loading for UITableView. This protocol extends `UITableViewDataSource` and requires the implementation of `collectionSkeletonView(_:cellIdentifierForRowAt:)` to provide cell identifiers. Optional methods allow customization of section count and row generation. ```APIDOC public protocol SkeletonTableViewDataSource: UITableViewDataSource { // Default: 1 func numSections(in collectionSkeletonView: UITableView) -> Int // Default: // Calculates how many cells are needed to fill the entire frame. func collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier } ``` -------------------------------- ### Updating Skeleton Appearance Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_es.md Methods to update the skeleton's appearance, including solid, gradient, animated solid, and animated gradient styles. ```swift view.updateSkeleton() // Solid view.updateGradientSkeleton() // Gradient view.updateAnimatedSkeleton() // Animated Solid view.updateAnimatedGradientSkeleton() // Animated Gradient ``` -------------------------------- ### Enabling Skeleton Debug Mode Source: https://github.com/juanpe/skeletonview/blob/main/Translations/README_fr.md Instructions on how to enable a debug mode for SkeletonView by setting an environment variable. This mode logs the view hierarchy to the console when skeletons are displayed. ```shell export SKELETON_DEBUG=true ```