UIActivityViewController using swift is similar to as we create in objective C , you can read it how to create UIActivityViewController in objective C from here. This post will give you an example of sharing image through UIActivityViewController in Swift.
Create a new project and select swift as development language. Add an image to your project and replace index.jpg with your image name. Open ViewController.swift and add below code to it.
@IBAction func clickAction (sender:UIButton)
in this post we learned about how to create UIActivityViewController in swift.