We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TraitEnvironment
1 parent d08766a commit a3172a2Copy full SHA for a3172a2
Sources/SwiftWin32/App and Environment/TraitEnvironment.swift
@@ -1,7 +1,17 @@
1
// Copyright © 2020 Saleem Abdulrasool <compnerd@compnerd.org>
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
+/// A set of methods that makes the interface environment available to your
5
+/// application.
6
public protocol TraitEnvironment {
7
+ // MARK - Accessing a Trait Collection
8
+
9
+ /// The traits, such as the size class and scale factor, that describe the
10
+ /// current environment of the object.
11
var traitCollection: TraitCollection { get }
12
13
+ // MARK - Responding to a Change in the Interface Environment
14
15
+ /// Called when the interface environment changes.
16
func traitCollectionDidChange(_ previousTraitCollection: TraitCollection?)
17
}
0 commit comments