commit | author | age
|
13e53a
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
H |
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 |
|
49b883
|
19 |
#import "TargetConditionals.h" |
L |
20 |
|
|
21 |
#if !TARGET_OS_TV |
|
22 |
|
13e53a
|
23 |
#import <UIKit/UIKit.h> |
H |
24 |
|
|
25 |
#import "FBSDKAppLinkNavigation.h" |
|
26 |
|
|
27 |
NS_ASSUME_NONNULL_BEGIN |
|
28 |
|
|
29 |
typedef NS_ENUM(NSUInteger, FBSDKIncludeStatusBarInSize) { |
|
30 |
FBSDKIncludeStatusBarInSizeNever, |
|
31 |
FBSDKIncludeStatusBarInSizeAlways, |
e81c27
|
32 |
} NS_SWIFT_NAME(FBAppLinkReturnToRefererView.StatusBarSizeInclude); |
13e53a
|
33 |
|
H |
34 |
@class FBSDKAppLinkReturnToRefererView; |
|
35 |
@class FBSDKURL; |
|
36 |
|
88188e
|
37 |
/** |
13e53a
|
38 |
Protocol that a class can implement in order to be notified when the user has navigated back |
H |
39 |
to the referer of an App Link. |
|
40 |
*/ |
e81c27
|
41 |
NS_SWIFT_NAME(AppLinkReturnToRefererViewDelegate) |
13e53a
|
42 |
@protocol FBSDKAppLinkReturnToRefererViewDelegate <NSObject> |
H |
43 |
|
88188e
|
44 |
/** |
13e53a
|
45 |
Called when the user has tapped inside the close button. |
H |
46 |
*/ |
e81c27
|
47 |
- (void)returnToRefererViewDidTapInsideCloseButton:(FBSDKAppLinkReturnToRefererView *)view |
H |
48 |
NS_SWIFT_NAME(returnToRefererViewDidTapInsideCloseButton(_:)); |
13e53a
|
49 |
|
88188e
|
50 |
/** |
13e53a
|
51 |
Called when the user has tapped inside the App Link portion of the view. |
H |
52 |
*/ |
|
53 |
- (void)returnToRefererViewDidTapInsideLink:(FBSDKAppLinkReturnToRefererView *)view |
e81c27
|
54 |
link:(FBSDKAppLink *)link |
H |
55 |
NS_SWIFT_NAME(returnToRefererView(_:didTapInside:)); |
13e53a
|
56 |
|
H |
57 |
@end |
|
58 |
|
88188e
|
59 |
/** |
13e53a
|
60 |
Provides a UIView that displays a button allowing users to navigate back to the |
H |
61 |
application that launched the App Link currently being handled, if the App Link |
|
62 |
contained referer data. The user can also close the view by clicking a close button |
|
63 |
rather than navigating away. If the view is provided an App Link that does not contain |
|
64 |
referer data, it will have zero size and no UI will be displayed. |
|
65 |
*/ |
|
66 |
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension") |
e81c27
|
67 |
NS_SWIFT_NAME(FBAppLinkReturnToRefererView) |
13e53a
|
68 |
@interface FBSDKAppLinkReturnToRefererView : UIView |
H |
69 |
|
88188e
|
70 |
/** |
13e53a
|
71 |
The delegate that will be notified when the user navigates back to the referer. |
H |
72 |
*/ |
|
73 |
@property (nonatomic, weak, nullable) id<FBSDKAppLinkReturnToRefererViewDelegate> delegate; |
|
74 |
|
88188e
|
75 |
/** |
13e53a
|
76 |
The color of the text label and close button. |
H |
77 |
*/ |
|
78 |
@property (nonatomic, strong) UIColor *textColor; |
|
79 |
|
|
80 |
@property (nonatomic, strong) FBSDKAppLink *refererAppLink; |
|
81 |
|
88188e
|
82 |
/** |
13e53a
|
83 |
Indicates whether to extend the size of the view to include the current status bar |
H |
84 |
size, for use in scenarios where the view might extend under the status bar on iOS 7 and |
|
85 |
above; this property has no effect on earlier versions of iOS. |
|
86 |
*/ |
e81c27
|
87 |
@property (nonatomic, assign) FBSDKIncludeStatusBarInSize includeStatusBarInSize |
H |
88 |
NS_SWIFT_NAME(statusBarSizeInclude); |
13e53a
|
89 |
|
88188e
|
90 |
/** |
13e53a
|
91 |
Indicates whether the user has closed the view by clicking the close button. |
H |
92 |
*/ |
e81c27
|
93 |
@property (nonatomic, assign, getter=isClosed) BOOL closed; |
13e53a
|
94 |
|
H |
95 |
@end |
|
96 |
|
|
97 |
NS_ASSUME_NONNULL_END |
49b883
|
98 |
|
L |
99 |
#endif |