Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A UITableView extension that enables cell insertion from the bottom of a table view.

License

NotificationsYou must be signed in to change notification settings

IDN-Media/ios.ReverseExtension

 
 

Repository files navigation

VersionLanguageLicensePlatformCarthage compatible

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 tore namespace property, and hiding those complex implementation.In addition, you can rollback to normal behaviour, only removingre namespace.

Example

import UIKitimport ReverseExtensionclassViewController:UIViewController{@IBOutlet weakvartableView:UITableView!overridefunc 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={ scrollViewinprint("scrollViewDidReachTop")}        tableView.re.scrollViewDidReachBottom={ scrollViewinprint("scrollViewDidReachBottom")}}}extensionViewController: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 throughCocoaPods. To installit, simply add the following line to your Podfile:

pod"ReverseExtension"

Carthage

If you’re usingCarthage, simply addReverseExtension to yourCartfile:

github "marty-suzuki/ReverseExtension"

Make sure to addReverseExtension.framework to "Linked Frameworks and Libraries" and "copy-frameworks" Build Phases.

Special Thanks

TouchVisualizer (Created by@morizotter)

Author

marty-suzuki,s1180183@gmail.com

License

ReverseExtension is available under the MIT license. See the LICENSE file for more info.

About

A UITableView extension that enables cell insertion from the bottom of a table view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift84.2%
  • Objective-C11.9%
  • Ruby3.9%

[8]ページ先頭

©2009-2025 Movatter.jp