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 |
|
49b883
|
19 |
#import "TargetConditionals.h" |
L |
20 |
|
|
21 |
#if !TARGET_OS_TV |
|
22 |
|
bad748
|
23 |
#import <UIKit/UIKit.h> |
W |
24 |
|
49b883
|
25 |
#import "FBSDKTooltipView.h" |
bad748
|
26 |
|
e81c27
|
27 |
NS_ASSUME_NONNULL_BEGIN |
H |
28 |
|
bad748
|
29 |
@protocol FBSDKLoginTooltipViewDelegate; |
W |
30 |
|
9febd9
|
31 |
/** |
bad748
|
32 |
|
9febd9
|
33 |
Represents a tooltip to be displayed next to a Facebook login button |
bad748
|
34 |
to highlight features for new users. |
W |
35 |
|
9febd9
|
36 |
|
W |
37 |
The `FBSDKLoginButton` may display this view automatically. If you do |
bad748
|
38 |
not use the `FBSDKLoginButton`, you can manually call one of the `present*` methods |
W |
39 |
as appropriate and customize behavior via `FBSDKLoginTooltipViewDelegate` delegate. |
|
40 |
|
|
41 |
By default, the `FBSDKLoginTooltipView` is not added to the superview until it is |
|
42 |
determined the app has migrated to the new login experience. You can override this |
|
43 |
(e.g., to test the UI layout) by implementing the delegate or setting `forceDisplay` to YES. |
|
44 |
|
|
45 |
*/ |
e81c27
|
46 |
NS_SWIFT_NAME(FBLoginTooltipView) |
bad748
|
47 |
@interface FBSDKLoginTooltipView : FBSDKTooltipView |
W |
48 |
|
9febd9
|
49 |
/** the delegate */ |
W |
50 |
@property (nonatomic, weak) id<FBSDKLoginTooltipViewDelegate> delegate; |
bad748
|
51 |
|
9febd9
|
52 |
/** if set to YES, the view will always be displayed and the delegate's |
bad748
|
53 |
`loginTooltipView:shouldAppear:` will NOT be called. */ |
e81c27
|
54 |
@property (nonatomic, assign, getter=shouldForceDisplay) BOOL forceDisplay; |
bad748
|
55 |
|
W |
56 |
@end |
|
57 |
|
9febd9
|
58 |
/** |
bad748
|
59 |
@protocol |
W |
60 |
|
9febd9
|
61 |
The `FBSDKLoginTooltipViewDelegate` protocol defines the methods used to receive event |
bad748
|
62 |
notifications from `FBSDKLoginTooltipView` objects. |
W |
63 |
*/ |
e81c27
|
64 |
NS_SWIFT_NAME(LoginTooltipViewDelegate) |
bad748
|
65 |
@protocol FBSDKLoginTooltipViewDelegate <NSObject> |
W |
66 |
|
|
67 |
@optional |
|
68 |
|
9febd9
|
69 |
/** |
W |
70 |
Asks the delegate if the tooltip view should appear |
bad748
|
71 |
|
13e53a
|
72 |
@param view The tooltip view. |
H |
73 |
@param appIsEligible The value fetched from the server identifying if the app |
bad748
|
74 |
is eligible for the new login experience. |
W |
75 |
|
9febd9
|
76 |
|
W |
77 |
Use this method to customize display behavior. |
bad748
|
78 |
*/ |
W |
79 |
- (BOOL)loginTooltipView:(FBSDKLoginTooltipView *)view shouldAppear:(BOOL)appIsEligible; |
|
80 |
|
9febd9
|
81 |
/** |
W |
82 |
Tells the delegate the tooltip view will appear, specifically after it's been |
bad748
|
83 |
added to the super view but before the fade in animation. |
W |
84 |
|
13e53a
|
85 |
@param view The tooltip view. |
bad748
|
86 |
*/ |
W |
87 |
- (void)loginTooltipViewWillAppear:(FBSDKLoginTooltipView *)view; |
|
88 |
|
9febd9
|
89 |
/** |
W |
90 |
Tells the delegate the tooltip view will not appear (i.e., was not |
bad748
|
91 |
added to the super view). |
W |
92 |
|
13e53a
|
93 |
@param view The tooltip view. |
bad748
|
94 |
*/ |
W |
95 |
- (void)loginTooltipViewWillNotAppear:(FBSDKLoginTooltipView *)view; |
|
96 |
|
|
97 |
|
|
98 |
@end |
e81c27
|
99 |
|
H |
100 |
NS_ASSUME_NONNULL_END |
49b883
|
101 |
|
L |
102 |
#endif |