//
//  ActivityViewGenerator.m
//

#import "ActivityViewGenerator.h"

@implementation ActivityViewGenerator

- (void)show {

	NSMutableArray * activityItems = @[].mutableCopy;
	
	//= [NSArray arrayWithObjects:shareUrl, shareString, nil];
	if (self.string.length) {
		[activityItems addObject:self.string];
	}
	if (self.URLString.length) {
		NSURL * url = [NSURL URLWithString:self.URLString];
		if (url) [activityItems addObject:url];
	}
	
	UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];

	//activityViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
	if (activityViewController) // iOS 6 and later
	[self.viewController presentViewController:activityViewController animated:YES completion:nil];

}

@end
