var views: [LibraryItem]
82 |
83 |
84 |
85 | Discussion
Use this method to attempt to dismiss a presentation. This function is used when you call the function dismiss().
init()
78 | case automatic
78 | false
68 | var prefersGrabberVisible: Bool
78 | case automatic
78 | View.
68 | var preferredStatusBarStyle: UIStatusBarStyle?
78 | case overFullScreen
78 | LibraryContentProvider.modifiers(base:).
68 | func modifiers(base: AnyView) -> [LibraryItem]
78 | var prefersStatusBarHidden: Bool?
78 | PreviewProvider.previews.
68 | static var previews: some View { get }
78 | case overFullScreen
78 | case overCurrentContext
78 | .large()
68 | var detents: [UISheetPresentationController.Detent]
78 | true so that the sheet will attempt to visually center itself over the View which it is attached to. Default: false
68 | var shouldAdjustToSourceView: Bool
78 | func callAsFunction()
78 | Use this method to attempt to dismiss a presentation. This function is used when you call the function dismiss().
false
68 | var prefersEdgeAttachedInCompactHeight: Bool
78 | nil (uses system default corner radius in this case)
68 | var preferredCornerRadius: CGFloat?
78 | nil or the identifier is not found in detents, the sheet is displayed at the smallest detent. Default: nil
68 | var selectedDetentIdentifier: Binding<UISheetPresentationController.Detent.Identifier?>?
78 | nil or the identifier is not found in detents, all detents are dimmed. Default: nil
68 | var largestUndimmedDetentIdentifier: UISheetPresentationController.Detent.Identifier?
78 | var focusGroupIdentifier: String?
78 | If this is nil, the view inherits the focus group of its parent focus environment.
The default value of this property is nil.
case custom(transitioningDelegate: UIViewControllerTransitioningDelegate?)
78 | case custom(transitioningDelegate: UIViewControllerTransitioningDelegate?)
78 | case pageSheet(properties: SheetPropertiesCompat? = nil)
78 | case formSheet(properties: SheetPropertiesCompat? = nil)
78 | View is forced into modal behavior.
68 | var isModalInPresentation: Bool
78 | When this is active, the presentation will prevent interactive dismiss and ignore events outside of the presented View bounds until this is set to false.
true to enforce the sheet to animate adaptation to a newly set selectedDetentIdentifier which is different from the one that has been used previously. Default: false
68 | var animatesSelectedDetentIdentifierChange: Bool
78 | LibraryContentProvider.views.
75 | var views: [LibraryItem] { get }
85 | PreviewProvider.platform.
75 | static var platform: PreviewPlatform? { get }
85 | false for non-modal sheets, where scrolling in the sheet should not expand the sheet and obscure the content above. Default: true
68 | var prefersScrollingExpandsWhenScrolledToEdge: Bool
78 | View.
68 | var preferredContentSize: CGSize
78 | The value in this property is used primarily when displaying the View in a popover but may also be used in other situations, for example when the View is displayed in a form sheet. Changing the value of this property while the View is being displayed in a popover animates the size change; however, the change is not animated if you specify a width or height of 0.0.
preferredContentSize to influence the width of the sheet when edge-attached. When false, the width of the sheet when edge-attached is always equal to the safe area width of the container. The value of this property is not respected in compact width regular height. Default: false
68 | var widthFollowsPreferredContentSizeWhenEdgeAttached: Bool
78 | var modalTransitionStyle: UIModalTransitionStyle
78 | This property determines how the View is animated onscreen when it is presented. To change the transition type, you must set this property before presenting the View. The default value for this property is UIModalTransitionStyle.coverVertical. For a list of possible transition styles, and their compatibility with the available presentation styles, see the UIModalTransitionStyle constant descriptions.
View.
68 | var preferredStatusBarUpdateAnimation: UIStatusBarAnimation?
78 | Default value is nil, in which case system uses UIStatusBarAnimation.fade. This property comes into play only when you actively change the status bar’s show/hide state by changing the prefersStatusBarHidden attribute.
var prefersHomeIndicatorAutoHidden: Bool?
78 | Default value is nil, in which case system interprets it as false. Set this value to true if your view lets the system determine when to hide the indicator, or false if you want the indicator shown at all times. The system takes your preference into account, but setting to true is no guarantee that the indicator will be hidden.
var restoresFocusAfterTransition: Bool
78 | When the value of this property is true, the item that was last focused automatically becomes focused when its view controller becomes visible and focusable. For example, if an item in the view controller is focused and a second view controller is presented, the original item becomes focused again when the second view controller is dismissed.
The default value of this property is true.
View takes over control of status bar appearance from the presenting View.
68 | var modalPresentationCapturesStatusBarAppearance: Bool
78 | The default value of this property is false. When you present a View by calling the shee() { ... } method, status bar appearance control is not transferred from the presenting to the presented View. By setting this property to true, you specify the presented view controller controls status bar appearance, even though presented non-fullscreen.
var views: [LibraryItem]
82 |
83 |
84 |
85 | SheetProperties which has no public initializers and which is used when compiled for iOS 13 or iOS 14.
61 | struct SheetPropertiesCompat
71 | This stub struct is available for compatibility reasons and requires the consumers to pass nil instead of its instance or omit the properties: argument for the ModalPresentationStyleCompat.formSheet(properties:), ModalPresentationStyleCompat.pageSheet(properties:) and ModalPresentationStyleCompat.popover(permittedArrowDirections:sourceRectTransform:adaptiveSheetProperties:)
case pageSheet(properties: SheetProperties? = nil)
78 | propertiesproperties to assign to UISheetPresentationController
case formSheet(properties: SheetProperties? = nil)
78 | propertiesproperties to assign to UISheetPresentationController
static var platform: PreviewPlatform?
82 |
83 |
84 |
85 | var preferredScreenEdgesDeferringSystemGestures: UIRectEdge?
78 | Normally, the screen-edge gestures defined by the system take precedence over any gesture recognizers that you define. The system uses its gestures to implement system level behaviors, such as to display Control Center.
Whenever possible, you should allow the system gestures to take precedence. However, immersive apps can use this property to allow app-defined gestures to take precedence over the system gestures. You do that by explicitly setting the screen edges for which your gestures should take precedence.
var providesPresentationContextTransitionStyle: Bool
78 | When a view controller’s definesPresentationContext property is true, it can replace the transition style of the presented view with its own. When the value of this property is set to true, the current view’s transition style is used instead of the style associated with the presented view. When the value of this property is false, UIKit uses the transition style of the presented view.
The default value of this property is false.
var definesPresentationContext: Bool
78 | When using the ModalPresentationStyle.overCurrentContext style to present a view, this property controls which existing view controller in your view controller hierarchy is actually covered by the new content. When a context-based presentation occurs, UIKit starts at the presenting view controller and walks up the view controller hierarchy. If it finds a view controller whose value for this property is true, it asks that view controller to present the new view controller. If no view controller defines the presentation context, UIKit asks the window’s root view controller to handle the presentation.
The default value for this property is false. Some system-provided view controllers, such as UINavigationController, change the default value to true.
var disablesAutomaticKeyboardDismissal: Bool?
78 | The default value of this property is nil, in which case the presented View uses the true value when the presentation style of the View is set to ModalPresentationStyle.formSheet(properties:) and uses false for other presentation styles. Thus, the system normally does not allow the keyboard to be dismissed for modal forms. Set the explicit value to allow or disallow the dismissal of the current input view (usually the system keyboard) when changing from a control that wants the input view to one that does not. Under normal circumstances, when the user taps a control that requires an input view, the system automatically displays that view. Tapping in a control that does not want an input view subsequently causes the current input view to be dismissed but may not in all cases. You can set the explicit value in those outstanding cases to allow the input view to be dismissed or use this property to prevent the view from being dismissed in other cases.
var prefersPointerLocked: Bool?
78 | The default is false. Setting this property to true indicates the view’s preference to lock the pointer, although the system may not honor the request. For the system to consider locking the pointer:
The scene must be full screen, not in Split View or Slide Over, with no other apps in Slide Over.
The scene must be in the UIScene.ActivationState.foregroundActive state.
In Mac Catalyst, the app must be in the foreground, and the window that contains the scene ordered to the front.
The system continuously monitors the state and when the app no longer satisfies the requirements, it disables the pointer lock.
When the lock state changes, the system posts UIPointerLockState.didChangeNotification.
case popover(permittedArrowDirections: UIPopoverArrowDirection = .any, sourceRectTransform: ((CGRect) -> CGRect)? = nil, adaptiveSheetProperties: SheetPropertiesCompat? = nil)
78 | permittedArrowDirectionsThe arrow directions that you allow for the popover.
sourceRectTransformallows to change the sourceRect of the UIPopoverPresentationController