-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve debug description and create SkeletonExtensions (#444)
* create sk extension and improve debug * update README * fix readme * Update README.md * include SkeletonTreeNode
- Loading branch information
Showing
18 changed files
with
241 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// Copyright SkeletonView. All Rights Reserved. | ||
// | ||
// Licensed under the MIT License (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://opensource.org/licenses/MIT | ||
// | ||
// SkeletonExtended.swift | ||
// | ||
// Created by Juanpe Catalán on 23/8/21. | ||
|
||
import Foundation | ||
|
||
/// Type that acts as a generic extension point for all `SkeletonViewExtended` types. | ||
public struct SkeletonViewExtension<ExtendedType> { | ||
/// Stores the type or meta-type of any extended type. | ||
public private(set) var type: ExtendedType | ||
|
||
/// Create an instance from the provided value. | ||
/// | ||
/// - Parameter type: Instance being extended. | ||
public init(_ type: ExtendedType) { | ||
self.type = type | ||
} | ||
} | ||
|
||
/// Protocol describing the `sk` extension points for SkeletonView extended types. | ||
public protocol SkeletonViewExtended { | ||
/// Type being extended. | ||
associatedtype ExtendedType | ||
|
||
/// Instance SkeletonView extension point. | ||
var sk: SkeletonViewExtension<ExtendedType> { get set } | ||
} | ||
|
||
extension SkeletonViewExtended { | ||
/// Instance SkeletonView extension point. | ||
public var sk: SkeletonViewExtension<Self> { | ||
get { SkeletonViewExtension(self) } | ||
// swiftlint:disable:next unused_setter_value | ||
set {} | ||
} | ||
} |
35 changes: 0 additions & 35 deletions
35
SkeletonViewCore/Sources/API/UIKitExtensions/UIView+Debug.swift
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
SkeletonViewCore/Sources/API/UIKitExtensions/UIView+Flags.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.