Skip to content

Add TabContentFlow for iOS 18+ Tab API#57

Open
janpollak wants to merge 2 commits intomainfrom
feature/tab-content-flow
Open

Add TabContentFlow for iOS 18+ Tab API#57
janpollak wants to merge 2 commits intomainfrom
feature/tab-content-flow

Conversation

@janpollak
Copy link
Copy Markdown
Contributor

Summary

  • Přidává TabContentFlow — varianta TabViewFlow pro iOS 18+ Tab API (@TabContentBuilder)
  • Umožňuje použití Tab(role: .search) a dalších iOS 18+ tab features v coordinator patternu
  • Extrahuje sdílenou modal logiku do ModalCoverModifier (snížení duplikace)
  • Non-breaking: stávající TabViewFlow zůstává pro zpětnou kompatibilitu

Enables use of Tab(role: .search) and other iOS 18+ tab features
within the FuturedArchitecture coordinator pattern. Extracts shared
modal presentation logic into ModalCoverModifier to reduce duplication.
@janpollak janpollak requested review from jmarek41, matejsemancik and ssestak and removed request for matejsemancik March 23, 2026 12:19
// MARK: - Shared Modal Presentation

/// Shared modifier that adds sheet and full-screen cover presentation to any coordinator-backed view.
struct ModalCoverModifier<C: Coordinator>: ViewModifier {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Toto by som uz ked tak vyextrahoval a prepouzil aj v ostatnych FlowCoordinatorch, ktore maju modal support.

Comment on lines +46 to +47
@available(iOS 18.0, macOS 15.0, tvOS 18.0, watchOS 11.0, *)
public struct TabContentFlow<Coordinator: TabCoordinator, Content: TabContent<Coordinator.Tab>>: View {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Zaroven by som pridal deprecation flag na tú pôvodnú štruktúru TabViewFlow

NSItemProvider (non-Sendable) was being sent across isolation
boundaries when calling the async loadImage() method. Fix uses
actor confinement: Task runs on @mainactor, and loadImageData()
extracts Data (Sendable) from the provider while staying on the
same actor. UIImage is then created from the data.
@janpollak janpollak force-pushed the feature/tab-content-flow branch from e3d9ba9 to 65e3aa8 Compare March 25, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants