commit | author | age
|
2e29a3
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#if !TARGET_OS_TV |
|
10 |
|
|
11 |
#import <UIKit/UIKit.h> |
|
12 |
|
|
13 |
@class FBSDKProfile; |
|
14 |
|
|
15 |
NS_ASSUME_NONNULL_BEGIN |
|
16 |
|
|
17 |
/** |
|
18 |
FBSDKProfilePictureMode enum |
|
19 |
Defines the aspect ratio mode for the source image of the profile picture. |
|
20 |
*/ |
|
21 |
typedef NS_ENUM(NSUInteger, FBSDKProfilePictureMode) { |
|
22 |
/** |
|
23 |
A square cropped version of the image will be included in the view. |
|
24 |
*/ |
|
25 |
FBSDKProfilePictureModeSquare, |
|
26 |
/** |
|
27 |
The original picture's aspect ratio will be used for the source image in the view. |
|
28 |
*/ |
|
29 |
FBSDKProfilePictureModeNormal, |
|
30 |
/** |
|
31 |
The original picture's aspect ratio will be used for the source image in the view. |
|
32 |
*/ |
|
33 |
FBSDKProfilePictureModeAlbum, |
|
34 |
/** |
|
35 |
The original picture's aspect ratio will be used for the source image in the view. |
|
36 |
*/ |
|
37 |
FBSDKProfilePictureModeSmall, |
|
38 |
/** |
|
39 |
The original picture's aspect ratio will be used for the source image in the view. |
|
40 |
*/ |
|
41 |
FBSDKProfilePictureModeLarge, |
|
42 |
} NS_SWIFT_NAME(Profile.PictureMode); |
|
43 |
|
|
44 |
/** |
|
45 |
A view to display a profile picture. |
|
46 |
*/ |
|
47 |
NS_SWIFT_NAME(FBProfilePictureView) |
|
48 |
@interface FBSDKProfilePictureView : UIView |
|
49 |
|
|
50 |
/** |
|
51 |
Create a new instance of `FBSDKProfilePictureView`. |
|
52 |
|
|
53 |
- Parameter frame: Frame rectangle for the view. |
|
54 |
- Parameter profile: Optional profile to display a picture for. |
|
55 |
*/ |
|
56 |
- (instancetype)initWithFrame:(CGRect)frame |
|
57 |
profile:(FBSDKProfile *_Nullable)profile; |
|
58 |
|
|
59 |
/** |
|
60 |
Create a new instance of `FBSDKProfilePictureView`. |
|
61 |
|
|
62 |
- Parameter profile: Optional profile to display a picture for. |
|
63 |
*/ |
|
64 |
- (instancetype)initWithProfile:(FBSDKProfile *_Nullable)profile; |
|
65 |
|
|
66 |
/** |
|
67 |
The mode for the receiver to determine the aspect ratio of the source image. |
|
68 |
*/ |
|
69 |
@property (nonatomic, assign) FBSDKProfilePictureMode pictureMode; |
|
70 |
|
|
71 |
/** |
|
72 |
The profile ID to show the picture for. |
|
73 |
*/ |
|
74 |
@property (nonatomic, copy) NSString *profileID; |
|
75 |
|
|
76 |
/** |
|
77 |
Explicitly marks the receiver as needing to update the image. |
|
78 |
|
|
79 |
This method is called whenever any properties that affect the source image are modified, but this can also |
|
80 |
be used to trigger a manual update of the image if it needs to be re-downloaded. |
|
81 |
*/ |
|
82 |
- (void)setNeedsImageUpdate; |
|
83 |
|
|
84 |
@end |
|
85 |
|
|
86 |
NS_ASSUME_NONNULL_END |
|
87 |
|
|
88 |
#endif |