IndexPath

struct IndexPath : ReferenceConvertible, Equatable, Hashable, MutableCollection, RandomAccessCollection, Comparable, ExpressibleByArrayLiteral
  • Returns an IndexPath of self.row + 1

    Declaration

    Swift

    public func nextInSection() -> IndexPath

    Return Value

    Next IndexPath

  • Returns an IndexPath of self.row - 1.

    Declaration

    Swift

    public func previousInSection() -> IndexPath

    Return Value

    Previous IndexPath

  • Modifies an IndexPath‘s row by adding the provided number

    Declaration

    Swift

    public mutating func modifyingRow(by number: Int)

    Parameters

    number

    Can be negative if you want to find a previous IndexPath

  • Modifies an IndexPath with the provided row and section

    Declaration

    Swift

    public mutating func modifyingBy(row: Int = 0, section: Int = 0)

    Parameters

    row

    Int to add to self.row

    section

    Int to add to section