To run the example project, clone the repo, and run pod install
from the Example directory first.
DLCustomActivity is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "DLCustomActivity"
#import <DLCustomActivity/DLCustomActivity.h>
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;
};
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;
};
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];
DLCustomActivity is available under the MIT license. See the LICENSE file for more info.