Skip to content

SCTableIndex is tableview item index list not use section Header

License

Notifications You must be signed in to change notification settings

myoungsc/SCTableIndex

Repository files navigation

SCTableIndex

CI Status Version License Platform

Description

SCTableIndex is tableview item index list not use section Header. If you set the sorted item as a string array, it makes a table of contents with the first letter. Then click on the letter to move the table view to the first item.

ScreenShot

Requirements

* Swift 5.0
* XCode 10.2
* iOS 9.0 (Min SDK)

Installation

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

pod "SCTableIndex"

pod "SCTableIndex", -> '0.2.0' //Swift 4.2
pod "SCTableIndex", -> '0.1.2' //Swift 4.0

//After
pod install

How To Use

import SCTableIndex

arrItem.sort()
sctbindex.delegate = self
//Use Selector Font, HelveticaNeue-Medium is Normal Font
//sctbindex.initialFont = UIFont(name: "HelveticaNeue-Medium", size: 13)!
//Use Selector initial Text Color, black is Normal Color
//sctbindex.initialTextColor = UIColor(red: 50.0/255.0, green: 50.0/255.0, blue: 50.0/255.0, alpha: 1.0)
//String Array item
sctbindex.setView(arrItem)


//MARK: SCTableIndex Delegate
extension ViewController: SCTableIndexDelegate {
    // Move starting point item that select initial text
    func scTableIndexReturnInitialText(_ strInitial: String, index: Int) {
        tbMain.scrollToRow(at: IndexPath(row: index, section: 0), at: .top, animated: true)
    }
}

Author

myoung

HomePage

myoungsc.dev@gmail.com

License

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

About

SCTableIndex is tableview item index list not use section Header

Resources

License

Stars

Watchers

Forks

Packages

No packages published