All Projects → cuzv → Photobrowser

cuzv / Photobrowser

Licence: mit
PhotoBrowser is a light weight photo browser, like the wechat, weibo image viewer.

Projects that are alternatives of or similar to Photobrowser

Rsshub
🍰 Everything is RSSible
Stars: ✭ 18,111 (+8483.41%)
Mutual labels:  wechat, twitter, weibo
Sns auth
通用第三方登录SDK,支持微信,微信扫码,QQ,微博登录,支付宝登录,Facebook,Line,Twitter,Google
Stars: ✭ 520 (+146.45%)
Mutual labels:  wechat, twitter
Socialsdklibrary
提供微博、微信、QQ、Tim、QQ 轻聊版、钉钉的登陆分享功能支持;
Stars: ✭ 399 (+89.1%)
Mutual labels:  wechat, weibo
Vuepress Plugin Social Share
📣 Social sharing plugin for VuePress
Stars: ✭ 27 (-87.2%)
Mutual labels:  twitter, weibo
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (+18.01%)
Mutual labels:  wechat, weibo
Laravel Socialite
Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban
Stars: ✭ 296 (+40.28%)
Mutual labels:  wechat, weibo
Lcactionsheet
一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Stars: ✭ 809 (+283.41%)
Mutual labels:  wechat, weibo
Diplomat
整合第三方 SDK 微信、微博、 QQ 等为统一的 Diplomat 接口。
Stars: ✭ 672 (+218.48%)
Mutual labels:  wechat, weibo
L Passport
Koa middleware and api sdk for wechat oauth, qq oauth, baidu oauth and weibo oauth
Stars: ✭ 52 (-75.36%)
Mutual labels:  wechat, weibo
Dragtodismiss Pangesture
仿微信,微博的大图查看和视频播放 拖拽消失的手势动画。手势单独已抽离出来,可用于任何视图。Simulate Wechat's disappeared gesture animation by dragging when the big picture viewing or video playback . Gestures are separated and can be used in any view
Stars: ✭ 55 (-73.93%)
Mutual labels:  wechat, weibo
Lxspider
爬虫案例合集。包括但不限于《淘宝、京东、天猫、豆瓣、抖音、快手、微博、微信、阿里、头条、pdd、优酷、爱奇艺、携程、12306、58、搜狐、百度指数、维普万方、Zlibraty、Oalib、小说、招标网、采购网、小红书》
Stars: ✭ 60 (-71.56%)
Mutual labels:  wechat, weibo
Monkeyking
MonkeyKing helps you to post messages to Chinese Social Networks.
Stars: ✭ 2,699 (+1179.15%)
Mutual labels:  wechat, weibo
Decryptlogin
APIs for loginning some websites by using requests.
Stars: ✭ 1,861 (+781.99%)
Mutual labels:  twitter, weibo
Xiaofendui
薅羊毛小分队(第一时间尽知羊毛)- 微信机器人即时推送
Stars: ✭ 356 (+68.72%)
Mutual labels:  wechat, weibo
Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+386.26%)
Mutual labels:  wechat, weibo
Fitness
Flutter 仿微博客户端!A Weibo client application developed with Flutter, which supports both Android and iOS.
Stars: ✭ 75 (-64.45%)
Mutual labels:  wechat, weibo
Nine grid view
Flutter NineGridView & DragSortView. Similar to Weibo / WeChat nine grid view controls to display pictures. Flutter仿微信/微博九宫格、拖拽排序,微信群组,钉钉群组,QQ讨论组头像。
Stars: ✭ 169 (-19.91%)
Mutual labels:  wechat, weibo
Dmarchiver
A tool to archive the direct messages, images and videos from your private conversations on Twitter
Stars: ✭ 204 (-3.32%)
Mutual labels:  twitter
Tweetledee
A PHP library that provides an incredibly easy way to access Twitter data as JSON or RSS feed by URL or standard CLI syntax.
Stars: ✭ 208 (-1.42%)
Mutual labels:  twitter
Electronic Wechat
💬 A better WeChat on macOS and Linux. Built with Electron by Zhongyi Tong.
Stars: ✭ 13,860 (+6468.72%)
Mutual labels:  wechat

License CocoaPods Compatible Carthage Compatible Weibo Twitter

PhotoBrowser

PhotoBrowser is a light weight photo browser, like the wechat, weibo image viewer.

Now, the pure Swift version named SlidingPhoto is available.

Features

  • [x] Present & Dismissal animation & gesture
  • [x] GIF support
  • [x] Display long picture

How does it look like?

  

Usage

  • Like the UITableView API, We have DataSource an Delegate for load data and handle action
  • Tell PhotoBrowser how many pages would you like to present by conforms protocol PBViewControllerDataSource and implement numberOfPagesInViewController: selector
  • Optional set the initialize page by pb_startPage property
  • Use for static Image - Conforms protocol PBViewControllerDataSource and implement viewController:imageForPageAtIndex: selector
  • Use for web image - Conforms protocol PBViewControllerDataSource and implement viewController:presentImageView:forPageAtIndex:progressHandler selector
  • Support animation - Conforms protocol PBViewControllerDataSource and implement thumbViewForPageAtIndex: tell the start and ended imageView position
  • Action callbacks - Conforms protocol PBViewControllerDelegate and implement viewController:didSingleTapedPageAtIndex:presentedImage: or viewController:didLongPressedPageAtIndex:presentedImage: handle single tap or long press action

Demo code

...
PBViewController *pbViewController = [PBViewController new];
// Use your own subclass of UIImageView to display.
pbViewController.imageViewClass = PBImageView.class;
pbViewController.pb_dataSource = self;
pbViewController.pb_delegate = self;
pbViewController.pb_startPage = sender.tag;
[self presentViewController:pbViewController animated:YES completion:nil];
...

...
#pragma mark - PBViewControllerDataSource

- (NSInteger)numberOfPagesInViewController:(PBViewController *)viewController {
    return self.frames.count;
}

- (void)viewController:(PBViewController *)viewController presentImageView:(UIImageView *)imageView forPageAtIndex:(NSInteger)index progressHandler:(void (^)(NSInteger, NSInteger))progressHandler {
    NSString *url = [NSString stringWithFormat:@"https://raw.githubusercontent.com/cuzv/PhotoBrowser/dev/Example/Assets/%@.jpg", @(index + 1)];
    UIImage *placeholder = self.imageViews[index].image;
    [imageView sd_setImageWithURL:[NSURL URLWithString:url]
                 placeholderImage:placeholder
                          options:0
                         progress:progressHandler
                        completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
                        }];
}

- (UIView *)thumbViewForPageAtIndex:(NSInteger)index {
    if (self.thumb) {
        return self.imageViews[index];
    }
    return nil;
}

#pragma mark - PBViewControllerDelegate

- (void)viewController:(PBViewController *)viewController didSingleTapedPageAtIndex:(NSInteger)index presentedImage:(UIImage *)presentedImage {
    [self dismissViewControllerAnimated:YES completion:nil];
}

For more information checkout the Example in project.

License

PhotoBrowser is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].