-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathBFRImageViewController.h
60 lines (41 loc) · 2.8 KB
/
BFRImageViewController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// BFRImageViewController.h
// Buffer
//
// Created by Jordan Morgan on 11/13/15.
//
//
#import <UIKit/UIKit.h>
@interface BFRImageViewController : UIViewController
- (instancetype _Nullable)init NS_UNAVAILABLE;
/*! Initializes an instance of @C BFRImageViewController from the image source provided. The array can contain a mix of @c NSURL, @c UIImage, @c PHAsset, @c BFRBackLoadedImageSource or @c NSStrings of URLS. This can be a mix of all these types, or just one. */
- (instancetype _Nullable)initWithImageSource:(NSArray * _Nonnull)images;
/*! Initializes an instance of @C BFRImageViewController from the image source provided. The array can contain a mix of @c NSURL, @c UIImage, @c PHAsset, or @c NSStrings of URLS. This can be a mix of all these types, or just one. Additionally, this customizes the user interface to defer showing some of its user interface elements, such as the close button, until it's been fully popped.*/
- (instancetype _Nullable)initForPeekWithImageSource:(NSArray * _Nonnull)images;
/*! Reinitialize with a new images array. Can be used to change the view controller's content on demand */
- (void)setImageSource:(NSArray * _Nonnull)images;
/*! Assigning YES to this property will make the background transparent. Default is NO. */
@property (nonatomic, getter=isUsingTransparentBackground) BOOL useTransparentBackground;
/*! Assigning YES to this property will disable long pressing media to present the activity view controller. Default is NO. */
@property (nonatomic, getter=shouldDisableSharingLongPress) BOOL disableSharingLongPress;
/*! Flag property that toggles the doneButton. Defaults to YES */
@property (nonatomic) BOOL enableDoneButton;
/*! Flag property that sets the doneButton position (left or right side). Defaults to YES */
@property (nonatomic) BOOL showDoneButtonOnLeft;
/*! Allows you to assign an index which to show first when opening multiple images. */
@property (nonatomic, assign) NSInteger startingIndex;
/*! Retrieve the index of the currently showing image. */
@property (nonatomic, assign, readonly) NSInteger currentIndex;
/*! Allows you to enable autoplay for peek&play feature on photo live view. Default to YES */
@property (nonatomic, getter=shouldDisableAutoplayForLivePhoto) BOOL disableAutoplayForLivePhoto;
/*! Allows you to set image max scale */
@property (nonatomic, assign) CGFloat maxScale;
/*! Dismiss properly with animations */
- (void)dismiss;
/*! Dismiss properly with animations and an optional completion handler */
- (void)dismissWithCompletion:(void (^ __nullable)(void))completion;
/*! Dismiss properly without custom animations */
- (void)dismissWithoutCustomAnimation;
/*! Dismiss properly without custom animations and an optional completion handler */
- (void)dismissWithoutCustomAnimationWithCompletion:(void (^ __nullable)(void))completion;
@end