commit | author | age
|
bad748
|
1 |
/* |
W |
2 |
* Copyright (c) 2014, Facebook, Inc. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the BSD-style license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. An additional grant |
|
7 |
* of patent rights can be found in the PATENTS file in the same directory. |
|
8 |
* |
|
9 |
*/ |
|
10 |
|
|
11 |
#import <Foundation/Foundation.h> |
|
12 |
#import <UIKit/UIKit.h> |
|
13 |
|
|
14 |
#import <Bolts/BFAppLinkNavigation.h> |
|
15 |
|
|
16 |
@class BFAppLinkReturnToRefererView; |
|
17 |
@class BFURL; |
|
18 |
|
|
19 |
typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) { |
|
20 |
BFIncludeStatusBarInSizeNever, |
|
21 |
BFIncludeStatusBarInSizeIOS7AndLater, |
|
22 |
BFIncludeStatusBarInSizeAlways, |
|
23 |
}; |
|
24 |
|
|
25 |
/*! |
|
26 |
Protocol that a class can implement in order to be notified when the user has navigated back |
|
27 |
to the referer of an App Link. |
|
28 |
*/ |
|
29 |
@protocol BFAppLinkReturnToRefererViewDelegate <NSObject> |
|
30 |
|
|
31 |
/*! |
|
32 |
Called when the user has tapped inside the close button. |
|
33 |
*/ |
|
34 |
- (void)returnToRefererViewDidTapInsideCloseButton:(BFAppLinkReturnToRefererView *)view; |
|
35 |
|
|
36 |
/*! |
|
37 |
Called when the user has tapped inside the App Link portion of the view. |
|
38 |
*/ |
|
39 |
- (void)returnToRefererViewDidTapInsideLink:(BFAppLinkReturnToRefererView *)view |
|
40 |
link:(BFAppLink *)link; |
|
41 |
|
|
42 |
@end |
|
43 |
|
|
44 |
/*! |
|
45 |
Provides a UIView that displays a button allowing users to navigate back to the |
|
46 |
application that launched the App Link currently being handled, if the App Link |
|
47 |
contained referer data. The user can also close the view by clicking a close button |
|
48 |
rather than navigating away. If the view is provided an App Link that does not contain |
|
49 |
referer data, it will have zero size and no UI will be displayed. |
|
50 |
*/ |
13e53a
|
51 |
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension") |
bad748
|
52 |
@interface BFAppLinkReturnToRefererView : UIView |
W |
53 |
|
|
54 |
/*! |
|
55 |
The delegate that will be notified when the user navigates back to the referer. |
|
56 |
*/ |
|
57 |
@property (nonatomic, weak) id<BFAppLinkReturnToRefererViewDelegate> delegate; |
|
58 |
|
|
59 |
/*! |
|
60 |
The color of the text label and close button. |
|
61 |
*/ |
|
62 |
@property (nonatomic, strong) UIColor *textColor; |
|
63 |
|
|
64 |
@property (nonatomic, strong) BFAppLink *refererAppLink; |
|
65 |
|
|
66 |
/*! |
|
67 |
Indicates whether to extend the size of the view to include the current status bar |
|
68 |
size, for use in scenarios where the view might extend under the status bar on iOS 7 and |
|
69 |
above; this property has no effect on earlier versions of iOS. |
|
70 |
*/ |
|
71 |
@property (nonatomic, assign) BFIncludeStatusBarInSize includeStatusBarInSize; |
|
72 |
|
|
73 |
/*! |
|
74 |
Indicates whether the user has closed the view by clicking the close button. |
|
75 |
*/ |
|
76 |
@property (nonatomic, assign) BOOL closed; |
|
77 |
|
|
78 |
@end |