antoniocasero/Arrows
关于
Arrows is an animated custom view to give feedback about your UI sliding panels.
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
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
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
/// 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, 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 on Twitter).
Credits
探索相关项目
加载中…