Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antoniocasero/arrows
Arrows is an animated custom view to give feedback about your UI sliding panels.
https://github.com/antoniocasero/arrows
animations arrow bezier-path core-graphics indicator panels sliding-menu ux
Last synced: about 6 hours ago
JSON representation
Arrows is an animated custom view to give feedback about your UI sliding panels.
- Host: GitHub
- URL: https://github.com/antoniocasero/arrows
- Owner: antoniocasero
- License: mit
- Created: 2018-09-29T06:23:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-15T13:30:25.000Z (over 6 years ago)
- Last Synced: 2025-01-22T22:08:44.589Z (8 days ago)
- Topics: animations, arrow, bezier-path, core-graphics, indicator, panels, sliding-menu, ux
- Language: Swift
- Homepage:
- Size: 2.13 MB
- Stars: 335
- Watchers: 9
- Forks: 21
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)
[![CocoaPods](https://img.shields.io/badge/pod-v1.0.0-blue.svg)](https://github.com/antoniocasero/Panels)
[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat)](https://developer.apple.com/iphone/index.action)
[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat)](https://developer.apple.com/swift)[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/acaserop)
Arrows is an animated custom view to represent three different arrow states: `up/down/middle`
## Usage
Just need to set `ArrowView` in the class you want to be painted with the arrow indicator in IB.
Or directly instantiate the class `ArrowView` in code. It is based on UIBezierPath, so the dimensions are defined by the view frame, don't worry about the resolution it will look perfect.In your ViewController, you can change the state of the arrow using `update` function
```swift
class YourViewController: UIViewController {
@IBOutlet weak var arrow: ArrowPanel!override func viewDidLoad() {
super.viewDidLoad()
// .up, .down, .middle
arrow.update(to: .middle, animated: true)
}
}
```You can find more options in `ArrowView`
```swift
/// Get the current position
fileprivate(set) var arrowPosition: Position = .middle/// Animation duration between arrow states (accessible from IB)
@IBInspectable open var arrowAnimationDuration: Double = 0.30/// Set arrow color (accessible from IB)
@IBInspectable open var arrowColor: UIColor = .black
```The perfect companion for `Arrows` is [Panels](https://github.com/antoniocasero/Panels), check it out! ✨
## Installation
### CocoaPods
Add the line `pod "Arrows"` to your `Podfile`### Carthage
Add the line `github "antoniocasero/Arrows"` to your `Cartfile`## Author
Project created by Antonio Casero ([@acaserop](https://twitter.com/acaserop) on Twitter).### Credits
[UI Sketch](https://www.sketchappsources.com/free-source/3599-vpn-app-design-sketch-freebie-resource.html)