Skip to content

Commit d057368

Browse files
committed
ViewController: add some additional documentation (NFC)
Add some documentation comments for `ModalTransitionStyle`.
1 parent dba7b2e commit d057368

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Sources/SwiftWin32/View Controllers/ViewController.swift

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,41 @@ import class Foundation.NSNotification
66

77
/// Transition styles available when presenting view controllers.
88
public enum ModalTransitionStyle: Int {
9+
///
10+
///
11+
/// When the view controller is presented, its view slides up from the bottom
12+
/// of the screen. On dismissal, the view slides back down. This is the
13+
/// default transition style.
914
case coverVertical
15+
16+
///
17+
///
18+
/// When the view controller is presented, the current view initiates a
19+
/// horizontal 3D flip from right-to-left, resulting in the revealing of the
20+
/// new view as if it were on the back of the previous view. On dismissal, the
21+
/// flip occurs from left-to-right, returning to the original view.
1022
case flipHorizontal
23+
24+
///
25+
///
26+
/// When the view controller is presented, the current view fades out while
27+
/// the new view fades in at the same time. On dismissal, a similar type of
28+
/// cross-fade is used to return to the original view.
1129
case crossDissolve
30+
31+
///
32+
///
33+
/// When the view controller is presented, one corner of the current view
34+
/// curls up to reveal the presented view underneath. On dismissal, the curled
35+
/// up page unfurls itself back on top of the presented view. A view
36+
/// controller presented using this transition is itself prevented from
37+
/// presenting any additional view controllers.
38+
///
39+
/// This transition style is supported only if the parent view controller is
40+
/// presenting a full-screen view and you use the
41+
/// `ModalPresentationStyle.fullScreen` modal presentation style. Attempting
42+
/// to use a different form factor for the parent view or a different
43+
/// presentation style triggers an exception.
1244
case partialCurl
1345
}
1446

0 commit comments

Comments
 (0)