Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

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)
    }
}
Comment

PREVIOUS NEXT
Code Example
Swift :: swift get top constraint 
Swift :: swift bring something to front of view 
Swift :: fizzbuzz in swift 
Swift :: swift substring 
Swift :: navigationController.pushViewController 
Swift :: Return multiple value of different types swift 
Swift :: swift http request header 
Swift :: swift dispatch after 
Swift :: add corner radius to uiview swift 
Swift :: swiftui full screen sheet 
Swift :: how to dismiss keyboard in swift 
Swift :: swift setinterval 
Swift :: how to loop swift 
Swift :: swiftui background color 
Swift :: NumberFormatter swift 
Swift :: string value of enum swift 
Swift :: count down timer swift stack overflow 
Swift :: swift screenshot 
Swift :: swift pdf thumbnail 
Swift :: set font uilabel swift 
Swift :: date format swift 
Swift :: swift extension Array where element 
Swift :: latex tall parentheses 
Swift :: swift switch statement 
Swift :: Swift Use of Hash Function 
Swift :: Swift guard Vs if Statement 
Swift :: Swift Generic Function 
Swift :: swift reading binary data 
Swift :: customize change color size MDCActivityIndicator swift 
Swift :: Define Swift Structure 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =