Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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`


Arrowa demo1

## 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! ✨


Arrowa demo1

## 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)