From 0234dd4146055021a6b897adac16fb0c1f789aaa Mon Sep 17 00:00:00 2001 From: Marvin Nazari Date: Wed, 13 Jan 2016 19:09:36 +0100 Subject: [PATCH] Added extra caption for ActionSheet --- SKPhotoBrowser/SKPhotoBrowser.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SKPhotoBrowser/SKPhotoBrowser.swift b/SKPhotoBrowser/SKPhotoBrowser.swift index 4a9d3a6..2e11985 100644 --- a/SKPhotoBrowser/SKPhotoBrowser.swift +++ b/SKPhotoBrowser/SKPhotoBrowser.swift @@ -31,6 +31,7 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate, UIActionShe // custom abilities public var displayAction:Bool = true + public var shareExtraCaption:String? = nil public var actionButtonTitles:[String]? public var displayToolbar:Bool = true public var displayCounterLabel:Bool = true @@ -824,7 +825,11 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate, UIActionShe } else { var activityItems:[AnyObject] = [photo.underlyingImage] if photo.caption != nil { - activityItems.append(photo.caption) + if let shareExtraCaption = shareExtraCaption { + activityItems.append(photo.caption + shareExtraCaption) + } else { + activityItems.append(photo.caption) + } } activityViewController = UIActivityViewController(activityItems: activityItems, applicationActivities: nil) activityViewController.completionWithItemsHandler = {