Latest 1.0.2
Homepage https://github.com/XiFengLang/JKPhotoBrowser
License MIT
Platforms ios 8.0, requires ARC
Dependencies SDWebImage
Frameworks UIKit
Authors

JKPhotoBrowser

高仿微信、iOS10相册的图片浏览器,具备拖拽缩放、渐变效果。

主要针对聊天界面、朋友圈界面实现图片浏览功能,并且高仿微信即iOS10相册的动画效果。实现部分的代码比较复杂,不在此列出,请下载工程查看。

gif

主要代码如

JKPhotoModel * photoModel = [JKPhotoModel modelWithImageView:imageView
                                                         smallPicUrl:model.imageUrl
                                                                cell:self
                                                         contentView:tableView];                                                                                                                                                                           
    UIImageView * imageView = (UIImageView *)tap.view;
    JKPhotoBrowser().jk_itemArray = self.imageModels;
    JKPhotoBrowser().jk_currentIndex = imageView.tag - 1;
    JKPhotoBrowser().jk_showPageController = YES;
    [[JKPhotoManager sharedManager] jk_showPhotoBrowser];
    JKPhotoBrowser().jk_delegate = self;
    JKPhotoBrowser().jk_QRCodeRecognizerEnable = YES;
/**    返回大图URL    */
- (NSString *)jk_bigImageUrlAtIndex:(NSInteger) index {
    JKImageModel * model = self.models[index];
    return model.imageUrl;
}

- (void)jk_handleImageWriteToSavedPhotosAlbumWithError:(NSError *)error {
    // ...
}

- (void)jk_handleQRCodeRecognitionResult:(NSString *)QRCodeContent {
    NSLog(@"%@",QRCodeContent);
    [JKPhotoBrowser() jk_hidesPhotoBrowserWhenPushed];
    [self.navigationController pushViewController:[JKViewController new] animated:YES];
}

gifgif

Latest podspec

{
    "name": "JKImageBrowser",
    "version": "1.0.2",
    "summary": "u4effu5faeu4fe1u56feu7247u6d4fu89c8u63a7u4ef6",
    "homepage": "https://github.com/XiFengLang/JKPhotoBrowser",
    "license": "MIT",
    "authors": {
        "XiFengLang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/XiFengLang/JKPhotoBrowser.git",
        "tag": "1.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "frameworks": "UIKit",
    "requires_arc": true,
    "source_files": "src/*.{h,m}",
    "dependencies": {
        "SDWebImage": [
            "~> 4.4.1"
        ]
    }
}

Pin It on Pinterest

Share This