Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marty-suzuki/ReverseExtension
A UITableView extension that enables cell insertion from the bottom of a table view.
https://github.com/marty-suzuki/ReverseExtension
extension reverse uitableview uitableviewcell
Last synced: 2 months ago
JSON representation
A UITableView extension that enables cell insertion from the bottom of a table view.
- Host: GitHub
- URL: https://github.com/marty-suzuki/ReverseExtension
- Owner: marty-suzuki
- License: mit
- Created: 2017-03-01T06:10:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-10-22T00:57:45.000Z (over 3 years ago)
- Last Synced: 2024-11-21T06:37:13.472Z (3 months ago)
- Topics: extension, reverse, uitableview, uitableviewcell
- Language: Swift
- Homepage:
- Size: 12.1 MB
- Stars: 1,676
- Watchers: 33
- Forks: 130
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - ReverseExtension - A UITableView extension that enables cell insertion from the bottom of a table view. (UI / Table View / Collection View)
- awesome-swift - ReverseExtension - UITableView extension that enables the insertion of cells the from bottom of a table view. (Libs / UI)
- awesome-swift - ReverseExtension - UITableView extension that enables the insertion of cells the from bottom of a table view. (Libs / UI)
- awesome-ios-star - ReverseExtension - A UITableView extension that enables cell insertion from the bottom of a table view. (UI / Table View / Collection View)
- fucking-awesome-swift - ReverseExtension - UITableView extension that enables the insertion of cells the from bottom of a table view. (Libs / UI)
- awesome-swift - ReverseExtension - A UITableView extension that enables cell insertion from the bottom of a table view. ` π a month ago` (UI [π](#readme))
README
# ReverseExtension
[![Version](https://img.shields.io/cocoapods/v/ReverseExtension.svg?style=flat)](http://cocoapods.org/pods/ReverseExtension)
[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat
)](https://developer.apple.com/swift)
[![License](https://img.shields.io/cocoapods/l/ReverseExtension.svg?style=flat)](http://cocoapods.org/pods/ReverseExtension)
[![Platform](https://img.shields.io/cocoapods/p/ReverseExtension.svg?style=flat)](http://cocoapods.org/pods/ReverseExtension)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)UITableView extension that enabled to insert cell from bottom of tableView.
## Concept
It is difficult to fill a tableview content from bottom.
So, ReverseExtension rotate both of UITableView and UITableViewCell like this images.
![]()
![]()
![]()
If you implement those in ViewController, it will have been fat.
So, escaping those implementation to `re` namespace property, and hiding those complex implementation.
In addition, you can rollback to normal behaviour, only removing `re` namespace.## Example
```swift
import UIKit
import ReverseExtensionclass ViewController: UIViewController {
@IBOutlet weak var tableView: UITableView!override func viewDidLoad() {
super.viewDidLoad()
tableView.re.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")//You can apply reverse effect only set delegate.
tableView.re.delegate = self
tableView.re.scrollViewDidReachTop = { scrollView in
print("scrollViewDidReachTop")
}
tableView.re.scrollViewDidReachBottom = { scrollView in
print("scrollViewDidReachBottom")
}
}
}extension ViewController: UITableViewDelegate {
//ReverseExtension also supports handling UITableViewDelegate.
func scrollViewDidScroll(_ scrollView: UIScrollView) {
print("scrollView.contentOffset.y =", scrollView.contentOffset.y)
}
}
```## Requirements
- Swift 5
- Xcode 12 or greater
- iOS 10 or greater## Installation
#### CocoaPods
ReverseExtension is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "ReverseExtension"
```#### Carthage
If youβre using [Carthage](https://github.com/Carthage/Carthage), simply add
ReverseExtension to your `Cartfile`:```
github "marty-suzuki/ReverseExtension"
```Make sure to add `ReverseExtension.framework` to "Linked Frameworks and Libraries" and "copy-frameworks" Build Phases.
## Special Thanks
[TouchVisualizer](https://github.com/morizotter/TouchVisualizer) (Created by [@morizotter](https://github.com/morizotter))
## Author
marty-suzuki, [email protected]
## License
ReverseExtension is available under the MIT license. See the LICENSE file for more info.