ShareLink
A view that controls a sharing presentation
Platform Compatibility
Tags
SwiftUI Code
HStack {
ShareLink(item: URL(string: "https://exploreswiftui.com")!)
ShareLink("Explore SwiftUI", item: URL(string: "https://exploreswiftui.com")!)
.padding(.horizontal)
ShareLink(item: URL(string: "https://exploreswiftui.com")!) {
Label("Foo", systemImage: "cube.transparent")
}
}Found an issue or have a suggestion?
More Link Components
View allCustom Preview Item ShareLink
Creates an instance, with a custom label, that presents the share interface
Explore Other Components
Browse allBackground Extension Effect
Adds the background extension effect to the view. The view will be duplicated into mirrored copies which will be placed around the view on any edge with available safe area. Additionally, a blur effect will be applied on top to blur out the copies
SliderTickContentForEach
A type of slider content that creates content by iterating over a collection.
Hide Tab Bar On Scroll Down
Minimize the tab bar when downwards scrolling starts. Minimizing is supported for tab bars on only iPhone
Prefer Vertical Toolbar Items
A compression behavior that prioritizes keeping toolbar items visible over other elements, such as tabs. By default, tabs are prioritized.
SegmentedPickerStyle
A picker style that presents the options in a segmented control. Use this style when there are two to five options. Consider using menu when there are more than five options.