commit | author | age
|
bad748
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
W |
2 |
// |
|
3 |
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
|
4 |
// copy, modify, and distribute this software in source code or binary form for use |
|
5 |
// in connection with the web services and APIs provided by Facebook. |
|
6 |
// |
|
7 |
// As with any software that integrates with the Facebook platform, your use of |
|
8 |
// this software is subject to the Facebook Developer Principles and Policies |
|
9 |
// [http://developers.facebook.com/policy/]. This copyright notice shall be |
|
10 |
// included in all copies or substantial portions of the software. |
|
11 |
// |
|
12 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
13 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
14 |
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
15 |
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
16 |
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
17 |
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
18 |
|
|
19 |
#import <UIKit/UIKit.h> |
|
20 |
|
|
21 |
#import <FBSDKShareKit/FBSDKShareDialogMode.h> |
|
22 |
#import <FBSDKShareKit/FBSDKSharing.h> |
|
23 |
#import <FBSDKShareKit/FBSDKSharingContent.h> |
|
24 |
|
e81c27
|
25 |
NS_ASSUME_NONNULL_BEGIN |
H |
26 |
|
9febd9
|
27 |
/** |
W |
28 |
A dialog for sharing content on Facebook. |
bad748
|
29 |
*/ |
e81c27
|
30 |
NS_SWIFT_NAME(ShareDialog) |
bad748
|
31 |
@interface FBSDKShareDialog : NSObject <FBSDKSharingDialog> |
W |
32 |
|
9febd9
|
33 |
/** |
e81c27
|
34 |
Convenience method to create a FBSDKShareDialog with a fromViewController, content and a delegate. |
H |
35 |
@param viewController A UIViewController to present the dialog from, if appropriate. |
|
36 |
@param content The content to be shared. |
|
37 |
@param delegate The receiver's delegate. |
|
38 |
*/ |
|
39 |
+ (instancetype)dialogWithViewController:(nullable UIViewController *)viewController |
|
40 |
withContent:(id<FBSDKSharingContent>)content |
|
41 |
delegate:(nullable id<FBSDKSharingDelegate>)delegate |
|
42 |
NS_SWIFT_NAME(init(fromViewController:content:delegate:)); |
|
43 |
|
|
44 |
/** |
|
45 |
Convenience method to show an FBSDKShareDialog with a fromViewController, content and a delegate. |
13e53a
|
46 |
@param viewController A UIViewController to present the dialog from, if appropriate. |
H |
47 |
@param content The content to be shared. |
|
48 |
@param delegate The receiver's delegate. |
bad748
|
49 |
*/ |
W |
50 |
+ (instancetype)showFromViewController:(UIViewController *)viewController |
|
51 |
withContent:(id<FBSDKSharingContent>)content |
e81c27
|
52 |
delegate:(nullable id<FBSDKSharingDelegate>)delegate |
H |
53 |
NS_SWIFT_UNAVAILABLE("Use init(fromViewController:content:delegate:).show() instead"); |
bad748
|
54 |
|
9febd9
|
55 |
/** |
W |
56 |
A UIViewController to present the dialog from. |
|
57 |
|
|
58 |
If not specified, the top most view controller will be automatically determined as best as possible. |
bad748
|
59 |
*/ |
W |
60 |
@property (nonatomic, weak) UIViewController *fromViewController; |
|
61 |
|
9febd9
|
62 |
/** |
W |
63 |
The mode with which to display the dialog. |
|
64 |
|
|
65 |
Defaults to FBSDKShareDialogModeAutomatic, which will automatically choose the best available mode. |
bad748
|
66 |
*/ |
W |
67 |
@property (nonatomic, assign) FBSDKShareDialogMode mode; |
|
68 |
|
|
69 |
@end |
e81c27
|
70 |
|
H |
71 |
NS_ASSUME_NONNULL_END |