PTImageAlbumViewController 0.0.1

PTImageAlbumViewController 0.0.1

测试已测试
语言语言 Obj-CObjective C
许可 Apache 2
发布最新发布2014年12月

无人认领 维护。



  • 作者:
  • Ali Servet Donmez

如何获取

$ cd <somewhere>
$ git clone git://github.com/exalted/PTImageAlbumViewController.git PTImageAlbumViewController-exalted
$ cd PTImageAlbumViewController-exalted/
$ git submodule update --init --recursive
$ open Examples/AlbumDemo/AlbumDemo.xcodeproj

示例代码

  1. 创建一个 PTImageAlbumViewController 的新子类,例如 YourAwesomeViewController
  2. 实现 PTImageAlbumViewDataSource
    • 图像数量
    • 每个图像的路径或 URL(高清和缩略图)
    • 高清图像的大小(宽度 & 高度)
// YourAwesomeViewController.h

#import "PTImageAlbumViewController.h"

@interface YourAwesomeViewController : PTImageAlbumViewController

// ...

@end
// YourAwesomeViewController.m

#import "YourAwesomeViewController.h"

@implementation YourAwesomeViewController

//...

#pragma mark - PTImageAlbumViewDataSource

- (NSInteger)numberOfImagesInAlbumView:(PTImageAlbumView *)imageAlbumView {
    #warning missing implementation
}

- (NSString *)imageAlbumView:(PTImageAlbumView *)imageAlbumView sourceForImageAtIndex:(NSInteger)index {
    #warning missing implementation
}

- (CGSize)imageAlbumView:(PTImageAlbumView *)imageAlbumView sizeForImageAtIndex:(NSInteger)index {
    #warning missing implementation
}

- (NSString *)imageAlbumView:(PTImageAlbumView *)imageAlbumView sourceForThumbnailImageAtIndex:(NSInteger)index {
    #warning missing implementation
}

//...

@end

截图

一个非常好的图像滑动条,就像在 iPad 的 Apple Photos 应用中一样。

A nice image scrubber, just like in Photos.app by Apple on the iPad. A nice image scrubber, just like in Photos.app by Apple on the iPad.

屏幕上一击,所有的前端都会消失!

One tap on the screen and all the chrome goes away! One tap on the screen and all the chrome goes away!

双击通过放大来适应屏幕...

Double tap to fit to screen by zooming in... Double tap to fit to screen by zooming in...

通过您已经熟悉和热爱的多指手势从一个图像翻转到另一个图像。

Flip from one image to another with multi–touch gestures you already know and love. Flip from one image to another with multi–touch gestures you already know and love.

捏来缩放以查看更近的图像。

Pinch to zoom in and out to take a much closer look. Pinch to zoom in and out to take a much closer look.