WindowResizabilityModifier.swift 691 B

12345678910111213
  1. extension Scene {
  2. /// Controls how each window's resizing bounds relate to the resizability of the
  3. /// window's content.
  4. ///
  5. /// This modifier controls how SwiftCrossUI determines the bounds within which
  6. /// windows can be resized, whereas ``View/windowResizeBehavior(_:)`` controls
  7. /// whether the user can resize the enclosing window. The only time this
  8. /// modifier can disable interactive resizing is when a window's content has
  9. /// a fixed size and `resizability` is ``WindowResizability/contentSize``.
  10. public func windowResizability(_ resizability: WindowResizability) -> some Scene {
  11. environment(\.windowResizability, resizability)
  12. }
  13. }