-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Version 1.1.0 has some breaking changes, but they're easily resolvable.
Changes in UIKit presentation (where self
is a view controller)
Action | Older Versions | Version 1.1.0 |
---|---|---|
Presenting | Popovers.present(popover) |
self.present(popover) or popover.present(in: window) |
Replacing | Popovers.replace(oldPopover, with: newPopover) |
self.replace(oldPopover, with: newPopover) or oldPopover.replace(with: newPopover) |
Dismissing | Popovers.dismiss(popover) |
self.dismiss(popover) or popover.dismiss() |
Changes in SwiftUI frame tags
Frame tags now support windows automatically.
Action | Older Versions | Version 1.1.0 |
Saving frame tags |
|
|
Retrieving frame tags |
/// where `currentWindowScene` is the current window scene
let savedFrame = Popovers.frameTagged("Your Tag", in: currentWindowScene) |
/// If outside a popover
WindowReader { window in
let savedFrame = window.frameTagged("Your Tag")
}
/// If inside a popover's view or background
PopoverReader { context in
let savedFrame = context.window.frameTagged("Your Tag")
} |
Removed methods
Popovers.prepare
is no longer needed and has been removed.
Removed properties
Popover.Attributes.windowScene
is no longer needed and has been removed.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation