Latest 1.0.0
Homepage https://github.com/Meniny/MXPhotoBrowser-in-Objective-C
License MIT
Platforms ios 8.0, requires ARC
Dependencies SDWebImage, pop, DACircularProgress
Frameworks Foundation, UIKit

MXPhotoBrowser-in-Objective-C

MXPhotoBrowser is a photo browser for iOS.

Installation with CocoaPods

pod 'MXPhotoBrowser'

Usage

  • You may need to disable the ATS.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
</plist>
#import "MXPhotoBrowser.h"
NSArray <MXPhoto*>* ps = [MXPhoto photosWithURLs:@[
                                                  @"http://img02.imgcdc.com/grab/img/20160907/86291473212635.jpeg",
                                                  @"http://img02.imgcdc.com/grab/img/20160907/71941473212635.jpeg",
                                                  @"http://i5.073img.com/160907/5808312_114823_3_lit.gif",
                                                  @"http://i5.073img.com/160907/5808312_114951_1_lit.jpg",
                                                  @"http://7xlvky.com1.z0.glb.clouddn.com/20160903164033644-882947694.jpg",
                                                  ]];

MXPhotoBrowser *browser = [[MXPhotoBrowser alloc] initWithPhotos:ps];
//    browser.delegate = self;
browser.useWhiteBackgroundColor = NO;
browser.view.tintColor          = [UIColor orangeColor];
browser.progressTintColor       = [UIColor orangeColor];
browser.trackTintColor          = [UIColor colorWithWhite:0.8 alpha:1];

[self presentViewController:browser animated:YES completion:nil];

Latest podspec

{
    "name": "MXPhotoBrowser",
    "version": "1.0.0",
    "summary": "A photo browser for iOS.",
    "description": "The first stable version of MXPhotoBrowser, a photo browser for iOS.",
    "homepage": "https://github.com/Meniny/MXPhotoBrowser-in-Objective-C",
    "license": "MIT",
    "authors": "Elias Abel",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/Meniny/MXPhotoBrowser-in-Objective-C.git",
        "tag": "1.0.0"
    },
    "source_files": "MXPhotoBrowser/**/*.{h,m}",
    "resources": "MXPhotoBrowser/Resources/*.{png, bundle}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "dependencies": {
        "SDWebImage": [],
        "pop": [],
        "DACircularProgress": []
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This