Created
          March 24, 2017 11:47 
        
      - 
      
- 
        Save KalpeshTalkar/bfb53bfc664159e8e270e5b613f7dee8 to your computer and use it in GitHub Desktop. 
    Custom UIActivity written in Swift 2.2
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // | |
| // CustomActivity.swift | |
| // | |
| // Created by Kalpesh on 24/03/17. | |
| // Copyright © 2017 Kalpesh Talkar. All rights reserved. | |
| // | |
| // | |
| class CustomActivity: UIActivity { | |
| override func activityType() -> String? { | |
| return "ActicityType" | |
| } | |
| override func activityTitle() -> String? { | |
| return "ActivityTitle" | |
| } | |
| override func canPerformWithActivityItems(activityItems: [AnyObject]) -> Bool { | |
| print(#function) | |
| return true | |
| } | |
| override func prepareWithActivityItems(activityItems: [AnyObject]) { | |
| print(#function) | |
| } | |
| override func activityViewController() -> UIViewController? { | |
| print(#function) | |
| return nil | |
| } | |
| override func performActivity() { | |
| print(#function) | |
| activityDidFinish(true) | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment