Skip to content

Commit

Permalink
Add a README
Browse files Browse the repository at this point in the history
  • Loading branch information
jegnux committed Dec 23, 2020
1 parent ca768da commit 45da526
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# Needs
# Needs

[![Version](https://img.shields.io/cocoapods/v/Needs.svg?style=flat)](https://cocoapods.org/pods/Needs)
[![License](https://img.shields.io/cocoapods/l/Needs.svg?style=flat)](https://cocoapods.org/pods/Needs)
[![Platform](https://img.shields.io/cocoapods/p/Needs.svg?style=flat)](https://cocoapods.org/pods/Needs)

*Needs* is a small library that let you use a property wrapper to automatically call `setNeeds-` methods.
It works out-of-the-box for all `setNeeds-` methods available on `UIView`, `UIViewController` and `NSView`.
If you _need to_ you can also [extend it](https://en.wikipedia.org/wiki/Open–closed_principle) with your own _Need_.

## Requirements

- iOS 9.0+ / macOS 10.10+
- Swift 5.2

## Installation
*Needs* is available through CocoaPods and SwiftPM

## Example

Add a `Needs` property wrapper to one of your properties to call automatically the desired `setNeeds-` method
```swift
@Needs(.layout, .display)
var progress: CGFloat = 0
```

## Author

[Jérôme Alves](https://twitter.com/jegnux)

## License

**Needs** is available under the MIT license. See the [LICENSE](LICENSE) file for more info.

0 comments on commit 45da526

Please sign in to comment.