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