Extensions on
View
Methods
drop(item:alignment:dismissingAfter:dismissingOnDrag:content:)
@ViewBuilder func drop<I: Identifiable, C: View>(
item: Binding<I?>,
alignment: VerticalAlignment = .top,
dismissingAfter timer: TimeInterval = 2,
dismissingOnDrag shouldDismissOnDrag: Bool = true,
@ViewBuilder content: @escaping (I) -> C
) -> some View
Overlay a drop view.
Parameters
Name | Type | Description |
---|---|---|
isPresented | An optional |
|
alignment | VerticalAlignment |
A valid |
timer | TimeInterval |
The time before it gets autodismissed. Defaults to |
shouldDismissOnDrag | Bool |
Whether dragging the drop view should dismiss it or not. Defaults to |
content | @escaping (I) -> C |
The drop view factory. |
Returns
Some View
.
drop(isPresented:alignment:dismissingAfter:dismissingOnDrag:content:)
@ViewBuilder func drop<C: View>(
isPresented: Binding<Bool>,
alignment: VerticalAlignment = .top,
dismissingAfter timer: TimeInterval = 2,
dismissingOnDrag shouldDismissOnDrag: Bool = true,
@ViewBuilder content: @escaping () -> C
) -> some View
Overlay a drop view.
Parameters
Name | Type | Description |
---|---|---|
isPresented | Binding<Bool> |
An optional |
alignment | VerticalAlignment |
A valid |
timer | TimeInterval |
The time before it gets autodismissed. Defaults to |
shouldDismissOnDrag | Bool |
Whether dragging the drop view should dismiss it or not. Defaults to |
content | @escaping () -> C |
The drop view factory. |
Returns
Some View
.
dropViewBalancing(_:)
func dropViewBalancing(_ balancing: Balancing) -> some View
Update the drop view Balancing
style.
Parameters
Name | Type | Description |
---|---|---|
balancing | Balancing |
A valid |
Returns
Some View
.
dropViewSeparatorColor(_:)
func dropViewSeparatorColor(_ separatorColor: Color) -> some View
Update the drop view separator color style.
Parameters
Name | Type | Description |
---|---|---|
separatorColor | Color |
A valid |
Returns
Some View
.
dropViewShadow(_:)
func dropViewShadow(_ shadow: Shadow) -> some View
Update the drop view separator shadow style.
Parameters
Name | Type | Description |
---|---|---|
shadow | Shadow |
A valid |
Returns
Some View
.
dropViewShadow(color:radius:x:y:)
func dropViewShadow(
color: Color = .black,
radius: CGFloat,
x: CGFloat = 0,
y: CGFloat = 0
) -> some View
Update the drop view separator shadow style.
Parameters
Name | Type | Description |
---|---|---|
color | Color |
The shadow color. Defaults to |
radius | CGFloat |
The shadow radius. |
x | CGFloat |
The shadow x offset. Defaults to |
y | CGFloat |
The shadow y offset. Defaults to |
Returns
Some View
.
shadow(_:)
func shadow(_ shadow: Shadow) -> some View
Apply a given Shadow
.
Parameters
Name | Type | Description |
---|---|---|
shadow | Shadow |
A valid |
Returns
Some View
.
dropViewBackgroundColor(_:)
func dropViewBackgroundColor(_ backgroundColor: Color) -> some View
Update the drop view background color style.
Parameters
Name | Type | Description |
---|---|---|
backgroundColor | Color |
A valid |
Returns
Some View
.