![]() ![]() We have a custom News reading application where the news appear as a tinder style flash cards and we want to share that card. ItemForActivityType activityType : String ) - > AnyObject ? func activityViewControllerPlaceholderItem ( _ activityViewController : UIActivityViewController ) - > AnyObject func activityViewController ( _ activityViewController : UIActivityViewController , Add sharing to your Swift app via UIActivityViewController Last updated on AugIn several iOS apps, such as Safari or the Camera app, you can click a button that brings up an interface that makes it easy to send or share what you are looking at via messages, Twitter, Facebook, etc. If you look at the documentation for UIActivityItemSource protocol there are two function which are required. Activity Items can be simple type like String, image, url or custom object which conform to UIActivityItemSource protocol. UIActivityViewController - init (activityItems activityItems : ,ĪpplicationActivities applicationActivities : ? )ĪctivityItems are the data object on which to perform the activity. With UIActivityViewController we can add ios sharing capabilities with a few lines of code. The system asks you if you want to activate the Share scheme, just select Activate. Just call it Shareor whatever name you prefer. IOS 7 and iOS 8 provide UIActivityViewController for making the social sharing a lot easier. Go into the project section, click on the + button and select the Share extension from the list. Swift share ios update#This update comes with tons of features to help developers build better apps and write less code. As expected, Apple announced a new version of SwiftUI that comes along with iOS 16 and Xcode 14. ![]() You can share to Social Media, or traditional means of message and mail. The SwiftUI framework continues to be one of the main focuses of the conference. IOS Sharing with UIActivityViewController in Swiftĭo you want to make your app viral? If so one of the key ingredient is adding ios sharing functionality in your app. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |