Skip to content

Commit a3172a2

Browse files
committed
App and Environment: TraitEnvironment documentation comments
Add some doc-comments for `TraitEnvironment`.
1 parent d08766a commit a3172a2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
// Copyright © 2020 Saleem Abdulrasool <[email protected]>
22
// SPDX-License-Identifier: BSD-3-Clause
33

4+
/// A set of methods that makes the interface environment available to your
5+
/// application.
46
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.
511
var traitCollection: TraitCollection { get }
12+
13+
// MARK - Responding to a Change in the Interface Environment
14+
15+
/// Called when the interface environment changes.
616
func traitCollectionDidChange(_ previousTraitCollection: TraitCollection?)
717
}

0 commit comments

Comments
 (0)