Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ integrate into application code written in UIKit.

### Presenting alerts and action sheets

- ``UIKit/UIAlertController/init(store:)``
- ``UIKit/UIAlertController``

### Stack-based navigation

- ``UIKitNavigation/NavigationStackController``
- ``UIKitNavigation/UIPushAction``

### Combine integration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import UIKit

extension NavigationStackController {

/// Drives a navigation stack controller with a store.
///
/// See the dedicated article on <doc:Navigation> for more information on the library's
Expand Down Expand Up @@ -69,4 +68,19 @@
}
}
}

@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
@MainActor
extension UIPushAction: Sendable {
/// Pushes an element of ``StackState`` onto the current navigation stack.
///
/// This is the UIKit equivalent of
/// ``SwiftUI/NavigationLink/init(state:label:fileID:filePath:line:column:)``.
///
/// - Parameter state: An element of stack state.
public func callAsFunction<Element: Hashable>(state: Element) {
@Dependency(\.stackElementID) var stackElementID
self(value: StackState.Component(id: stackElementID(), element: state))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reports an issue under the hood, so we should probably thread through the source context, but we need to make changes to Swift Navigation and cut a release to do that.

}
}
#endif
Loading