一款简洁实用方便的相册图片浏览器

因为项目中经常要用到图片浏览器,所以最近利用空闲时间做了一款简洁的相册图片浏览器,支持浏览图片,视频,兼容ios7。地址:https://github.com/shushaoyong/SYPhotoBrowser

下面是示例代码:

使用方法

1.展示图片

SYPhotoGroupViewController *vc = [[SYPhotoGroupViewController alloc] init];
vc.videoEnabled = NO;
vc.didFinishcompletionBlock = ^(NSArray *items)
{
NSLog(@"选择的图片:%@",items);
};
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentViewController:nav animated:YES completion:nil];
2.展示视频

SYPhotoGroupViewController *vc = [[SYPhotoGroupViewController alloc] init];
vc.videoEnabled = YES;
vc.didFinishcompletionBlock = ^(NSArray *items)
{
NSLog(@"选择的视频:%@",items);
};
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentViewController:nav animated:YES completion:nil];

 ios图片浏览器

更多效果 请进入github查看:

地址:https://github.com/shushaoyong/SYPhotoBrowser

 

posted @ 2017-05-08 11:52  勇敢的少年  阅读(624)  评论(0编辑  收藏  举报