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