Latest 0.1.0
License MIT
Platforms ios 8.0

CI StatusVersionLicensePlatform

Easier to use PhotosKit


To run the example project, clone the repo, and run pod install from the Example directory first.


  • Xcode 6
  • iOS 8.0 +


LIPhotosKitManager is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "LIPhotosKitManager"

How to use

Importing Headers then create property and initialization

#import <LIPhotosKitManager.h> //---------------------------------------1

@interface ViewController ()<LIPhotosKitManagerDelegate>
@property (nonatomic, strong) LIPhotosKitManager *manager; //-----------2

@implementation ViewController
- (void)viewDidLoad {
    [super viewDidLoad];

    self.manager = [[LIPhotosKitManager alloc] init];
    self.manager.delagate = self;

- (void)managerDidReceivePhotoLibraryChangeNotification
    // delegate method
    // update your datasource and refresh ui

Get Albums

You can use allSystemAlbums or allUserCustomAlbums methods to get albums in your device. These methods return a array contain LIAlbum objects.

NSArray *systemAlbums = [self.manager allSystemAlbums];
NSArray *customAlbums = [self.manager allUserCustomAlbums];

Get Photos

Before obtaining Photos, you must get the LIID object. There are two ways to get that object. One is read from LIAlbum object, another is use the allPhotosIDSortByCreateDateAscending:

NSArray *imageIDs = [self.manager allPhotosIDSortByCreateDateAscending:YES];

Everything is ready ,use the following methods to get the photos you want:

  • requestThumbnailImageForID:size:contentMode:target:resultHandler:
  • requestOriginalImageForID:target:resultHandler:
  • requestOriginalImageDataForID:target:resultHandler:


LIID *idObj = self.imageIDs[index];
UIImageView *imageView = self.imageView;
[self.manager requestThumbnailImageForID:idObj size:CGSizeMake(100, 100) contentMode:0 target:imageView resultHandler:^(UIImage *result, id target, NSDictionary *info) {
    UIImageView *imageView = target;
    imageView.image = result;


Ruwei Li, [email protected]


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

Latest podspec

    "name": "LIPhotosKitManager",
    "version": "0.1.0",
    "summary": "Easier to use PhotosKit.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Robert": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.0"
    "platforms": {
        "ios": "8.0"
    "source_files": "LIPhotosKitManager/Classes/**/*"

Pin It on Pinterest

Share This