반응형
공유하기
UIActivityViewController
https://developer.apple.com/documentation/uikit/uiactivityviewcontroller
공유하기 제외타입
UIActivityType
https://developer.apple.com/documentation/uikit/uiactivitytype
let text = "공유"
let url = "http://google.com"
let img = UIImage(named: "login_logo")
let activityVC = UIActivityViewController(activityItems:[text,url,img ?? ""], applicationActivities: nil)
//공유하기에서 제외할 타입들
activityVC.excludedActivityTypes = [UIActivityType.airDrop,UIActivityType.print,UIActivityType.copyToPasteboard,UIActivityType.assignToContact]
self.present(activityVC, animated: true, completion: nil)
반응형
'모바일 > IOS' 카테고리의 다른 글
FCM 앱에서 메시지 수신 (0) | 2018.04.25 |
---|---|
WKWebview에서 자바스크립트 호출 (0) | 2018.04.24 |
무한스크롤 infinite scroll (0) | 2018.02.27 |
how to open an URL in Swift (0) | 2018.02.23 |
키보드관련 (0) | 2018.02.09 |