SkillAgentSearch skills...

SCTableIndex

SCTableIndex is tableview item index list not use section Header

Install / Use

/learn @myoungsc/SCTableIndex
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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.

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated6y ago
Forks3

Languages

Swift

Security Score

75/100

Audited on Apr 23, 2019

No findings