Giter Site home page Giter Site logo

shelby-yao / tzimagepreviewcontroller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from banchichen/tzimagepreviewcontroller

0.0 1.0 0.0 1.45 MB

对TZImagePickerController库的增强,支持用UIImage、NSURL预览照片和用NSURL预览视频。

License: MIT License

Ruby 2.38% Objective-C 97.62%

tzimagepreviewcontroller's Introduction

TZImagePreviewController

CocoaPods

Enhance the TZImagePickerController library, supports to preview photo by UIImage or NSURL and preview video by NSURL.
TZImagePickerController库的增强,支持用UIImage、NSURL预览照片和用NSURL预览视频。

一. Installation 安装

CocoaPods

pod 'TZImagePreviewController'

手动安装

将TZImagePickerController文件夹拽入项目中,导入头文件:#import "TZImagePreviewController.h"

二. Example 例子

TZImagePreviewController *previewVc = [[TZImagePreviewController alloc] initWithPhotos:self.selectedPhotos currentIndex:indexPath.row tzImagePickerVc:[self createTZImagePickerController]];
[previewVc setBackButtonClickBlock:^(BOOL isSelectOriginalPhoto) {
    NSLog(@"back isSelectOriginalPhoto:%d", isSelectOriginalPhoto);
}];
[previewVc setSetImageWithURLBlock:^(NSURL *URL, UIImageView *imageView) {
    [imageView sd_setImageWithURL:URL];
}];
[previewVc setDoneButtonClickBlock:^(NSArray *photos, BOOL isSelectOriginalPhoto) {
    self.selectedPhotos = [NSMutableArray arrayWithArray:photos];
    NSLog(@"done isSelectOriginalPhoto:%d photos.count:%zd", isSelectOriginalPhoto, photos.count);
    [self.collectionView reloadData];
}];
[self presentViewController:previewVc animated:YES completion:nil];

三. Requirements 要求

iOS 8 or later. Requires ARC
iOS8及以上系统可使用. ARC环境.

四. More 更多

There is Demo inside, Please refer to Demo for usage.
内有Demo,请参考Demo进行使用。

tzimagepreviewcontroller's People

Contributors

banchichen avatar shelby-yao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.