ShareSheet: UIViewControllerRepresentable swiftui
struct ShareSheetView: View {
var body: some View {
Button(action: actionSheet) {
Image(systemName: "square.and.arrow.up")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 36, height: 36)
}
}
func actionSheet() {
guard let data = URL(string: "https://www.apple.com") else { return }
let av = UIActivityViewController(activityItems: [data], applicationActivities: nil)
UIApplication.shared.windows.first?.rootViewController?.present(av, animated: true, completion: nil)
}
}
Also in Swift:
- remove padding hstack swiftui
- settimeout in swift
- how to set the center in view in swift
- swift get slected row data in tableview cell
- tellraw minecraft
- swift textfield trim special characters before database
- add textfield in swiftui
- swift change background color
- xcode enable a button after a text field is filled
- UISearchController keys
- swift how to change the header color
- how to detect widget family and return specific view widget swift
- custom binding swiftui
- button image not working swiftui
- loop backwards swift
- get length of array swift
- show back button in navbar swift
- swift
- ShareSheet: UIViewControllerRepresentable swiftui
- dequeueReusableCellWithIdentifier returns nil
- swift uiview add tap gesture
- swift toggle on change
- swiftui foreach
- swift sort list true before false