Latest 1.0.1
Homepage https://github.com/Chren/GSImageViewer
License MIT
Platforms ios 7.0, requires ARC
Dependencies SDWebImage
Authors

GSImageViewer is a simple and easy to use image viewer. It supports basic image viewing, scaling, saving, you can set two kind of datasource: a collection of UIImages or a collection of web image urls. It also support prefetch when sliding.

GSImageViewer

Howto Install

Install with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the Get Started section for more details.

Podfile

platform :ios, '7.0'
pod 'GSImageViewer', '~>1.0.1'

Install manually

  • Clone GSImageViewer repository.
    git clone --recursive https://github.com/Chren/GSImageViewer.git
  • Clone SDWebImage repository.
    git clone --recursive https://github.com/rs/SDWebImage.git
  • Add GSImageViewer, SDWebImage to your project.

Usage

  • DataSource with UIImage
    NSArray *dataSource = @[[UIImage imageNamed:@"image1"], [UIImage imageNamed:@"image2"], [UIImage imageNamed:@"image3"]];
    GSImageCollectionViewController *imageCollectionVC = [GSImageCollectionViewController viewControllerWithDataSource:dataSource];
    [self.navigationController pushViewController:imageCollectionVC animated:YES];
  • DataSource with web image url
    NSArray *dataSource = @[@"http://img5.duitang.com/uploads/item/201410/13/20141013002336_ESvrT.jpeg",
                            @"http://mg.soupingguo.com/bizhi/big/10/285/619/10285619.jpg"];
    GSImageCollectionViewController *imageCollectionVC = [GSImageCollectionViewController viewControllerWithDataSource:dataSource];
    [self.navigationController pushViewController:imageCollectionVC animated:YES];
  • Preset pageindex
    NSArray *dataSource = @[@"http://img5.duitang.com/uploads/item/201410/13/20141013002336_ESvrT.jpeg",
                            @"http://mg.soupingguo.com/bizhi/big/10/285/619/10285619.jpg"];
    GSImageCollectionViewController *imageCollectionVC = [GSImageCollectionViewController viewControllerWithDataSource:dataSource];
    imageCollectionVC.defaultPageIndex = 1;
    [self.navigationController pushViewController:imageCollectionVC animated:YES];

Requirements

  • iOS7.0 (>=)
  • ARC

License

GSImageViewer is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "GSImageViewer",
    "version": "1.0.1",
    "summary": "GSImageViewer is an easy to use image viewer, which support multiple images and web image prefetch.",
    "description": "GSImageViewer is an easy to use image viewer, it support two kind of datasource: UIImage and web image url. nFeatures:nPrefeatch",
    "homepage": "https://github.com/Chren/GSImageViewer",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Aren": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/Chren/GSImageViewer.git",
        "tag": "1.0.1"
    },
    "source_files": "GSImagePreview/*.{h,m}",
    "resources": [
        "GSImagePreview/*.{xib}",
        "GSImagePreview/Resources/GSImagePreview.bundle",
        "GSImagePreview/Resources/Localizations/**"
    ],
    "requires_arc": true,
    "dependencies": {
        "SDWebImage": [
            "~> 3.7.3"
        ]
    }
}

Pin It on Pinterest

Share This