pop(from:)
Pops the element corresponding to id
from the stack, and all elements after it.
mutating func pop(from id: StackElementID)
Parameters
- id
The identifier of an element in the stack.
Pops the element corresponding to id
from the stack, and all elements after it.
mutating func pop(from id: StackElementID)
s22ComposableArchitecture10StackStateV3pop4fromyAA0C9ElementIDV_tF
What are these?4M45E
The identifier of an element in the stack.
import ComposableArchitecture
The Composable Architecture (TCA, for short) is a library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind. It can be used in SwiftUI, UIKit, and more, and on any Apple platform (iOS, macOS, tvOS, and watchOS).
struct StackState<Element>
A list of data representing the content of a navigation stack.
struct StackElementID
An opaque type that identifies an element of StackState
.
init()
var customDumpMirror: Mirror { get }
var debugDescription: String { get }
var description: String { get }
var endIndex: Int { get }
var ids: OrderedSet<StackElementID> { get }
An ordered set of identifiers, one for each stack element.
var startIndex: Int { get }
subscript(position: Int) -> Element { get }
subscript<Case>(id id: StackElementID, case path: CaseKeyPath<Element, Case>) -> Case? where Element : CasePathable { get set }
Accesses the value associated with the given id and case for reading and writing.
subscript<Case>(id id: StackElementID, case path: AnyCasePath<Element, Case>, fileID fileID: _HashableStaticString = #fileID, filePath filePath: _HashableStaticString = #filePath, line line: UInt = #line, column column: UInt = #column) -> Case? { get set }
subscript(id id: StackElementID, fileID fileID: _HashableStaticString = #fileID, filePath filePath: _HashableStaticString = #filePath, line line: UInt = #line, column column: UInt = #column) -> Element? { get set }
Accesses the value associated with the given id for reading and writing.
func index(after i: Int) -> Int
func index(before i: Int) -> Int
mutating func pop(to id: StackElementID)
Pops all elements that come after the element corresponding to id
in the stack.
mutating func removeAll(keepingCapacity keepCapacity: Bool = false)
mutating func replaceSubrange(_ subrange: Range<Int>, with newElements: some Collection<Element>)
struct Component
struct PathView