Add documentation for AnyLoadingIndicator
This commit is contained in:
parent
b3dface0c8
commit
f0d4fd9505
|
|
@ -22,16 +22,21 @@
|
|||
|
||||
import UIKit
|
||||
|
||||
/// Type that performs some kind of type erasure for LoadingIndicator.
|
||||
public struct AnyLoadingIndicator: Animatable {
|
||||
|
||||
private let internalView: UIView
|
||||
private let animatableView: Animatable
|
||||
|
||||
/// Initializer with indicator that should be wrapped.
|
||||
///
|
||||
/// - Parameter _: indicator for wrapping.
|
||||
public init<Indicator>(_ base: Indicator) where Indicator: LoadingIndicator {
|
||||
self.internalView = base.view
|
||||
self.animatableView = base.view
|
||||
}
|
||||
|
||||
/// The indicator view.
|
||||
var view: UIView {
|
||||
return internalView
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue