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)
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Found possible bug, in iOS 15. When I have view with sheet of identifiable items, and fullscreen cover or usual sheet.
click one button, then close it with swipe. And open another view.
it's open randomly previous content or if it's change between item sheet it would open new and close immediately
and console show this message:
"Currently, only presenting a single sheet is supported. The next sheet will be presented when the currently presented sheet gets dismissed."
You can check out, this gist minimal reproduction of this weird behaviour