Latest 0.1.0
Homepage https://github.com/darcyliu/DLCustomActivity
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

DLCustomActivity is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "DLCustomActivity"

Sample Code

Import DLCustomActivity

#import <DLCustomActivity/DLCustomActivity.h>

For Action Activity

DLActionActivity *actionActivity = [[DLActionActivity alloc] initWithActivityTitle:@"Action Title" activityImageName:@"Icon"];
actionActivity.canPerformActivityBlock = ^(DLCustomActivity *activity,NSArray *activityItems){
    return YES;
};
actionActivity.performActivityBlock = ^(DLCustomActivity *activity,NSArray *activityItems){
    return YES;
};

For Share Activity

DLShareActivity *shareActivity = [[DLShareActivity alloc] initWithActivityTitle:@"Share Title" activityImageName:@"Icon"];
shareActivity.canPerformActivityBlock = ^(DLCustomActivity *activity,NSArray *activityItems){
    return YES;
};
shareActivity.performActivityBlock = ^(DLCustomActivity *activity,NSArray *activityItems){
    return YES;
};

Present UIActivityViewController

NSString *text = @"Share Text";
NSURL *url = [NSURL URLWithString:@"http://www.example.com"];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[text,url] applicationActivities:@[actionActivity,shareActivity]];
[self presentViewController:activityViewController animated:YES completion:NULL];

Author

Darcy Liu, Email

License

DLCustomActivity is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DLCustomActivity",
    "version": "0.1.0",
    "summary": "An easy way to create any custom UIActivity.",
    "description": "                       Create any custom UIActivity without subclass.n",
    "homepage": "https://github.com/darcyliu/DLCustomActivity",
    "license": "MIT",
    "authors": {
        "Darcy Liu": "[email protected]"
    },
    "source": {
        "git": "https://github.com/darcyliu/DLCustomActivity.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes",
    "resource_bundles": {
        "DLCustomActivity": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This