# Windless [](https://github.com/Carthage/Carthage) [](http://cocoapods.org/pods/Hero)    [](https://github.com/lkzhao/Hero/blob/master/LICENSE?raw=true) **Windless** makes it easy to implement invisible layout loading view.
|
|
|
```swift
import Windless
class ViewController: UIViewController {
@IBOutlet weak var contentsView: UIView!
override func viewDidLoad() {
super.viewDidLoad()
contentsView.windless.start()
}
}
```
### Multiline
Depending on the `lineHeight` value and the` spacing` value, UILabel and UITextView will reconstruct the layout when the windless animation runs.
```swift
public protocol CanBeMultipleLines {
var lineHeight: CGFloat { get set }
var spacing: CGFloat { get set }
}
```
| Configuration | Result
|------- | -------
|
|
### Custom Options
There are several customizable options in **Windless**.
```swift
public class WindlessConfiguration {
/// The direction of windless animation. Defaults to rightDiagonal.
public var direction: WindlessDirection = .rightDiagonal
/// The speed of windless animation. Defaults to 1.
public var speed: Float = 1
/// The duration of the fade used when windless begins. Defaults to 0.
public var beginTime: CFTimeInterval = 0
/// The time interval windless in seconds. Defaults to 4.
public var duration: CFTimeInterval = 4
/// The time interval between windless in seconds. Defaults to 2.
public var pauseDuration: CFTimeInterval = 2
/// gradient animation timingFunction default easeOut
public var timingFuction: CAMediaTimingFunction = .easeOut
/// gradient layer center color default .lightGray
public var animationLayerColor: UIColor = .lightGray
/// Mask layer background color default .groupTableViewBackground
public var animationBackgroundColor: UIColor = .groupTableViewBackground
/// The opacity of the content while it is windless. Defaults to 0.8.
public var animationLayerOpacity: CGFloat = 0.8
}
```
To set the options, use the apply method as shown below.
```swift
import Windless
class ViewController: UIViewController {
@IBOutlet weak var contentsView: UIView!
override func viewDidLoad() {
super.viewDidLoad()
contentsView.windless
.apply {
$0.beginTime = 1
$0.pauseDuration = 2
$0.duration = 3
$0.animationLayerOpacity = 0.5
}
.start()
}
}
```
If you want to know more detailed usage, please refer to Example.
## Looks
The `isWindlessable` value determines how the loading view looks. The images below show how the loading screen will look according to the `isWindlessable` value.
> ```isWindlessable```= 🌀
| Configuration | Result
|------- | -------
|
|
|
|
|
|
## Communication
- If you **found a bug**, open an issue.
- If you **have a feature request**, open an issue.
- If you **want to contribute**, submit a pull request.
## Credits
- GwangBeom Park ([@gwangbeom](https://github.com/ParkGwangBeom))
## License
Windless is released under the MIT license. See LICENSE for details.