IndexPath
struct IndexPath : ReferenceConvertible, Equatable, Hashable, MutableCollection, RandomAccessCollection, Comparable, ExpressibleByArrayLiteral
-
Returns an
IndexPathofself.row + 1Declaration
Swift
public func nextInSection() -> IndexPathReturn Value
Next
IndexPath -
Returns an
IndexPathofself.row - 1.Declaration
Swift
public func previousInSection() -> IndexPathReturn Value
Previous
IndexPath
-
Modifies an
IndexPath‘s row by adding the provided numberDeclaration
Swift
public mutating func modifyingRow(by number: Int)Parameters
numberCan be negative if you want to find a previous
IndexPath -
Modifies an
IndexPathwith the provided row and sectionDeclaration
Swift
public mutating func modifyingBy(row: Int = 0, section: Int = 0)Parameters
rowInt to add to
self.rowsectionInt to add to
section
IndexPath Extension Reference