Latest 0.0.6
Homepage https://github.com/xTrinch/MRTableViewCellCountScrollIndicator
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Shows a simple UITableView scroll count indicator. Written in Swift 2.2.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Moving content from under the keyboard in iOS / Swift

Usage

Create a MRTableViewCellCountScrollIndicator class, initialize it with your tableView. There are some variables in the class like color, height, opacity, alpha that you could change, or leave them at default values. Your ViewController remains the delegate and dataSource for the tableView, so all you have to make sure is to set the correct number of items after you fetch them from your API.

For fadeout see example project.

import MRTableViewCellCountScrollIndicator

class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {

    @IBOutlet weak var tableView: UITableView!
    var articles:[Article] = []
    var cellCounter:MRTableViewCellCountScrollIndicator?

    override func viewDidLoad() {
        super.viewDidLoad()
        tableView.delegate = self
        tableView.dataSource = self
        tableView.rowHeight = UITableViewAutomaticDimension
        cellCounter = MRTableViewCellCountScrollIndicator(tableView: tableView)
        cellCounter!.scrollCountView.mainBackgroundColor = UIColor.blueColor()
        cellCounter!.opacity = 0.7
        cellCounter!.rightOffset = 0
        fetchDataFromApi()
    }

    func fetchDataFromApi() {
      // fetch data
      cellCounter!.totalScrollCountNum = articles.count
      tableView.reloadData()
    }
}

Installation

MRTableViewCellCountScrollIndicator is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MRTableViewCellCountScrollIndicator"

Author

xTrinch, [email protected]

License

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

Latest podspec

{
    "name": "MRTableViewCellCountScrollIndicator",
    "version": "0.0.6",
    "summary": "Table View Cell Scroll Count Indicator",
    "description": "Shows a simple scroll count indicator when the user scrolls up and down in the tableView.",
    "homepage": "https://github.com/xTrinch/MRTableViewCellCountScrollIndicator",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Mojca Rojko": "[email protected]"
    },
    "source": {
        "git": "https://github.com/xTrinch/MRTableViewCellCountScrollIndicator.git",
        "tag": "0.0.6"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MRTableViewCellCountScrollIndicator/Classes/**/*",
    "resource_bundles": {
        "MRTableViewCellCountScrollIndicator": [
            "MRTableViewCellCountScrollIndicator/Assets/*.{png,xib}"
        ]
    }
}

Pin It on Pinterest

Share This