Latest 1.0.1
Homepage https://github.com/winter6768/WPictureViewer
License MIT
Platforms ios 8.0, requires ARC
Dependencies SDWebImage
Authors

一款自定义图片查看器,当前版本 1.0.1

cocoapods 导入 ‘pod WPictureViewer’

使用方法

import "WPictureViewer.h"

初始化:

WPictureViewer *viewer = [WPictureViewer new];

viewer.delegate = self;

viewer.showIndexTitle = YES;

viewer.currentIndex = 0;

viewer.itemSpace = 10;

viewer.animationType = WPictureViewerAnimationScale;

[viewer show];

必须实现的代理方法:

/**

图片总个数

@return NSInteger

*/

-(NSInteger)numberOfItems;

/**

对应位置的图片资源(image、URL)

@param index 当前index

@return 图片资源

*/

-(id)imageSourceForIndex:(NSInteger)index;

选择实现的代理方法:

/**
翻页

@param index 当前index

*/

-(void)pictureViewerIndexDidChange:(NSInteger)index;

/**

获取点击的imageview 动画显示和消失调用

@param index 当前index

@return UIImageView

*/

-(UIImageView *)imageViewForIndex:(NSInteger)index;

Latest podspec

{
    "name": "WPictureViewer",
    "version": "1.0.1",
    "summary": "u8fd9u662fu4e00u4e2au56feu7247u67e5u770bu5668",
    "description": "u8fd9u662fu4e00u4e2au81eau5b9au4e49u56feu7247u67e5u770bu5668",
    "homepage": "https://github.com/winter6768/WPictureViewer",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "winter": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/winter6768/WPictureViewer.git",
        "tag": "1.0.1"
    },
    "source_files": "WPictureViewer/WPictureViewer/*.{h,m}",
    "resources": "WPictureViewer/WPictureViewer/WPictureViewer.bundle",
    "requires_arc": true,
    "dependencies": {
        "SDWebImage": [
            "~> 3.8.1"
        ]
    }
}

Pin It on Pinterest

Share This