SheetPresentationOptions
public struct SheetPresentationOptions
Options for presentation. These options are passed to created
SheetPresentationController objects upon creation.
-
Options for the corners of the presented view controller.
See moreDeclaration
Swift
public enum CornerOptions : Equatable -
The corner radius options to apply to the presented view controller.
Declaration
Swift
public let cornerOptions: CornerOptions -
The
alphavalue for the dimming view used behind the presented view controller. The color is black. Usenilto avoid adding a dimming view behind the presented view controller.Declaration
Swift
public let dimmingViewAlpha: CGFloat? -
The amount to inset the presented view controller from the presentation container. This is a minimum; there may be additional insets depending on the safe area insets and margins of the container. Use
ignoredEdgesForMarginsto customize the margin behavior for each edge.Declaration
Swift
public let edgeInsets: DirectionalEdgeInsetsConvertible -
Edges of the presentation container view for which its margins should be ignored for layout purposes, including the safe area.
Declaration
Swift
public let ignoredEdgesForMargins: [ViewEdgeConvertible] -
The location to place the presented view controller’s view in the presentation container.
Declaration
Swift
public let presentationLayout: PresentationLayout -
The animation behavior to use when the presented view controller is appearing or being dismissed.
Declaration
Swift
public let animationBehavior: AnimationBehavior -
The default options that are used when calling
init()on aSheetPresentationManagerwith no options.Declaration
Swift
public static let `default`: SheetPresentationOptions -
init(cornerOptions:dimmingViewAlpha: edgeInsets: ignoredEdgesForMargins: presentationLayout: animationBehavior: ) Creates a value with provided
CornerOptions.Declaration
Swift
public init( cornerOptions: CornerOptions = .roundAllCorners(radius: 10), dimmingViewAlpha: CGFloat? = 0.5, edgeInsets: DirectionalEdgeInsetsConvertible = constantInsets(20), ignoredEdgesForMargins: [ViewEdgeConvertible] = [], presentationLayout: PresentationLayout = .default, animationBehavior: AnimationBehavior = .system )Parameters
cornerOptionsCornerOptionsto use.dimmingViewAlphaThe
alphavalue for the dimming view used behind the presented view controller. The color is black. Defaults to0.5. Usenilto avoid using a dimming view.edgeInsetsThe amount to inset the presented view controller from the presenting view controller. This is a minimum; there may be additional insets depending on the safe area insets of the presenting view controller’s view (iOS 11 and later). Defaults to edge insets of
20points on each side.ignoredEdgesForMarginsEdges of the presenting view controller’s view for which its margins should be ignored for layout purposes, including the safe area.
presentationEdgeEdge of the screen from which to present. Defaults to
.bottom.animationBehaviorThe way that the presentation animates the appearance and dismissal of the presented view controller.
View on GitHub
Install in Dash
SheetPresentationOptions Structure Reference