Array

extension Array where Element: Equatable
extension Array where Element == IndexPath

Available where Element: Equatable

  • Return array containing elements of self that are also in other, plus elements from other that are not in self

    Declaration

    Swift

    func updatePreservingOrder(from other: Array) -> [Element]

    Parameters

    other

    the array to update from

Available where Element == IndexPath

  • Return element from self that is closest (in .row value) to the elt

    Declaration

    Swift

    func closest(to elt: Element) -> Element?

    Parameters

    elt

    element to compare to self elements