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 |
*/ |
|
51 |
@interface BFAppLinkReturnToRefererView : UIView |
|
52 |
|
|
53 |
/*! |
|
54 |
The delegate that will be notified when the user navigates back to the referer. |
|
55 |
*/ |
|
56 |
@property (nonatomic, weak) id<BFAppLinkReturnToRefererViewDelegate> delegate; |
|
57 |
|
|
58 |
/*! |
|
59 |
The color of the text label and close button. |
|
60 |
*/ |
|
61 |
@property (nonatomic, strong) UIColor *textColor; |
|
62 |
|
|
63 |
@property (nonatomic, strong) BFAppLink *refererAppLink; |
|
64 |
|
|
65 |
/*! |
|
66 |
Indicates whether to extend the size of the view to include the current status bar |
|
67 |
size, for use in scenarios where the view might extend under the status bar on iOS 7 and |
|
68 |
above; this property has no effect on earlier versions of iOS. |
|
69 |
*/ |
|
70 |
@property (nonatomic, assign) BFIncludeStatusBarInSize includeStatusBarInSize; |
|
71 |
|
|
72 |
/*! |
|
73 |
Indicates whether the user has closed the view by clicking the close button. |
|
74 |
*/ |
|
75 |
@property (nonatomic, assign) BOOL closed; |
|
76 |
|
|
77 |
@end |