Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hellc/bottomaction
Bottom action view
https://github.com/hellc/bottomaction
Last synced: about 1 month ago
JSON representation
Bottom action view
- Host: GitHub
- URL: https://github.com/hellc/bottomaction
- Owner: hellc
- License: mit
- Created: 2020-06-01T12:34:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T21:35:26.000Z (over 4 years ago)
- Last Synced: 2024-10-05T19:17:53.980Z (3 months ago)
- Language: Swift
- Size: 1.51 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Bottom action control
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/BottomAction.svg)](https://img.shields.io/cocoapods/v/BottomAction.svg)
[![Platform](https://img.shields.io/cocoapods/p/BottomAction.svg?style=flat)](https://alamofire.github.io/BottomAction)### Usage
```ruby
pod 'BottomAction'
```![Image description](https://github.com/hellc/BottomAction/blob/master/Preview/setup.png)
```swift
import BottomAction...
@IBOutlet weak var bottomActionView: BottomActionView!
override func viewDidLoad() {
super.viewDidLoad()self.prepareBottomAction()
}private func prepareBottomAction() {
self.bottomActionView.actionButton.isEnabled = false
self.bottomActionView.actionButton.setTitle(self.isCreating ? "Add" : "Save", for: .normal)
self.bottomActionView.actionClosure = { sender in
self.onBottomActionTap(sender)
}
}private func onBottomActionTap(_ sender: UIControl?) {
// TODO: Action logic
}
```## Result
![Image description](https://github.com/hellc/BottomAction/blob/master/Preview/demo.gif)