FWImagePreviewViewDelegate
@protocol FWImagePreviewViewDelegate <FWZoomImageViewDelegate>
@optional
- (NSInteger)numberOfImagesInImagePreviewView:(FWImagePreviewView *)imagePreviewView;
- (void)imagePreviewView:(FWImagePreviewView *)imagePreviewView renderZoomImageView:(FWZoomImageView *)zoomImageView atIndex:(NSInteger)index;
/// 是否重置指定index的zoomImageView,未实现时默认YES
- (BOOL)imagePreviewView:(FWImagePreviewView *)imagePreviewView shouldResetZoomImageView:(FWZoomImageView *)zoomImageView atIndex:(NSInteger)index;
/// 返回要展示的媒体资源的类型(图片、live photo、视频),如果不实现此方法,则 FWImagePreviewView 将无法选择最合适的 cell 来复用从而略微增大系统开销
- (FWImagePreviewMediaType)imagePreviewView:(FWImagePreviewView *)imagePreviewView assetTypeAtIndex:(NSInteger)index;
/**
* 当左右的滚动停止时会触发这个方法
* @param imagePreviewView 当前预览的 FWImagePreviewView
* @param index 当前滚动到的图片所在的索引
*/
- (void)imagePreviewView:(FWImagePreviewView *)imagePreviewView didScrollToIndex:(NSInteger)index;
/**
* 在滚动过程中,如果某一张图片的边缘(左/右)经过预览控件的中心点时,就会触发这个方法
* @param imagePreviewView 当前预览的 FWImagePreviewView
* @param index 当前滚动到的图片所在的索引
*/
- (void)imagePreviewView:(FWImagePreviewView *)imagePreviewView willScrollHalfToIndex:(NSInteger)index;
@end
Undocumented
-
Undocumented
Declaration
Objective-C
- (NSInteger)numberOfImagesInImagePreviewView:(FWImagePreviewView *)imagePreviewView;
-
Undocumented
Declaration
Objective-C
- (void)imagePreviewView:(FWImagePreviewView *)imagePreviewView renderZoomImageView:(FWZoomImageView *)zoomImageView atIndex:(NSInteger)index;
-
是否重置指定index的zoomImageView,未实现时默认YES
Declaration
Objective-C
- (BOOL)imagePreviewView:(nonnull FWImagePreviewView *)imagePreviewView shouldResetZoomImageView:(nonnull FWZoomImageView *)zoomImageView atIndex:(NSInteger)index;
-
返回要展示的媒体资源的类型(图片、live photo、视频),如果不实现此方法,则 FWImagePreviewView 将无法选择最合适的 cell 来复用从而略微增大系统开销
Declaration
Objective-C
- (FWImagePreviewMediaType)imagePreviewView: (nonnull FWImagePreviewView *)imagePreviewView assetTypeAtIndex:(NSInteger)index;
-
当左右的滚动停止时会触发这个方法
Declaration
Objective-C
- (void)imagePreviewView:(nonnull FWImagePreviewView *)imagePreviewView didScrollToIndex:(NSInteger)index;
Parameters
imagePreviewView
当前预览的 FWImagePreviewView
index
当前滚动到的图片所在的索引
-
在滚动过程中,如果某一张图片的边缘(左/右)经过预览控件的中心点时,就会触发这个方法
Declaration
Objective-C
- (void)imagePreviewView:(nonnull FWImagePreviewView *)imagePreviewView willScrollHalfToIndex:(NSInteger)index;
Parameters
imagePreviewView
当前预览的 FWImagePreviewView
index
当前滚动到的图片所在的索引