Array

extension Array: SectionIndexTitles where Element == String
extension Array: SectionTexts where Element == String?

Available where Element == String

  • Section Index Titles for UITableView. Related to UITableViewDataSource method sectionIndexTitlesForTableView.

    Declaration

    Swift

    public var sectionIndexTitles: [String]? { get }
  • Asks the data provider to return the index of the section having the given title and section title index.

    Declaration

    Swift

    public func indexPath(forSectionIndexTitle sectionIndexTitle: String,
                          at index: Int) -> IndexPath

    Parameters

    sectionIndexTitle

    The title as displayed in the section index

    index

    An index number identifying a section title in the array returned by sectionIndexTitles

    Return Value

    An index number identifying a section.

Available where Element == String?

  • Generates a optional section title for a given section

    Declaration

    Swift

    public func text(inSection section: Int) -> String?

    Parameters

    section

    the section to generate the title for

    Return Value

    a section header title