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