Hello, I wonder why new overlay (and background too) function introduced in iOS 15 isn't available in previous versions, but Section inits are available? Probably according to articles in the internet it uses _alwaysEmitIntoClient swift attribute. Is it design flaw?
iOS 15 overlay, which is limited only to iOS15:
@inlinable public func overlay<V>(alignment: Alignment = .center, @ViewBuilder content: () -> V) -> some View where V : View
pre iOS 15 overlay:
@available(iOS, introduced: 13.0, deprecated: 100000.0, message: "Use `overlay(alignment:content:)` instead.")
@available(macOS, introduced: 10.15, deprecated: 100000.0, message: "Use `overlay(alignment:content:)` instead.")
@available(tvOS, introduced: 13.0, deprecated: 100000.0, message: "Use `overlay(alignment:content:)` instead.")
@available(watchOS, introduced: 6.0, deprecated: 100000.0, message: "Use `overlay(alignment:content:)` instead.")
@inlinable public func overlay<Overlay>(_ overlay: Overlay, alignment: Alignment = .center) -> some View where Overlay : View
Section iOS 15 ViewBuilder init, which is available in previous versions:
public init(@ViewBuilder content: () -> Content, @ViewBuilder header: () -> Parent, @ViewBuilder footer: () -> Footer)
Section iOS 13 init:
extension Section where Parent : View, Content : View, Footer : View {
@available(iOS, deprecated: 100000.0, renamed: "Section(content:header:footer:)")
@available(macOS, deprecated: 100000.0, renamed: "Section(content:header:footer:)")
@available(tvOS, deprecated: 100000.0, renamed: "Section(content:header:footer:)")
@available(watchOS, deprecated: 100000.0, renamed: "Section(content:header:footer:)")
public init(header: Parent, footer: Footer, @ViewBuilder content: () -> Content)
}