SwiftUIStarterKit Documentation

Structure Indexed​Collection

public struct IndexedCollection<Base: RandomAccessCollection>: RandomAccessCollection  

Helper for being able to address a `` with a .indexed method.

See: https://stackoverflow.com/a/57842608/8859365

%7 IndexedCollection IndexedCollection RandomAccessCollection RandomAccessCollection IndexedCollection->RandomAccessCollection

Conforms To

RandomAccessCollection

Nested Type Aliases

Index

public typealias Index = Base.Index

Element

public typealias Element = (index: Index, element: Base.Element) 

Properties

base

public let base: Base

start​Index

public var startIndex: Index  

end​Index

public var endIndex: Index  

Methods

index(after:​)

public func index(after i: Index) -> Index  

index(before:​)

public func index(before i: Index) -> Index  

index(_:​offset​By:​)

public func index(_ i: Index, offsetBy distance: Int) -> Index