#import <CTAssetsPickerController/CTAssetsPickerController.h>
// request authorization status
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status){
dispatch_async(dispatch_get_main_queue(), ^{
// init picker
CTAssetsPickerController *picker = [[CTAssetsPickerController
alloc] init];
// set delegate
picker.delegate = self;
// Optionally present picker as a form sheet on iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
picker.modalPresentationStyle = UIModalPresentationFormSheet;
// present picker
[self presentViewController:picker animated:YES completion:nil];
});
}];
- (void)assetsPickerController:(CTAssetsPickerController *)picker
didFinishPickingAssets:(NSArray *)assets
{
// assets contains PHAsset objects.
}
NSArray *assets = @[asset1, asset2, asset3, ...];
CTAssetsPageViewController *vc = [[CTAssetsPageViewController alloc]
initWithAssets:assets];
vc.pageIndex = assets.count - 1; // display the last asset
[self.navigationController pushViewController:vc animated:YES];
more Detail Visie Below Link :-
https://github.com/chiunam/CTAssetsPickerController
// request authorization status
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status){
dispatch_async(dispatch_get_main_queue(), ^{
// init picker
CTAssetsPickerController *picker = [[CTAssetsPickerController
alloc] init];
// set delegate
picker.delegate = self;
// Optionally present picker as a form sheet on iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
picker.modalPresentationStyle = UIModalPresentationFormSheet;
// present picker
[self presentViewController:picker animated:YES completion:nil];
});
}];
- (void)assetsPickerController:(CTAssetsPickerController *)picker
didFinishPickingAssets:(NSArray *)assets
{
// assets contains PHAsset objects.
}
NSArray *assets = @[asset1, asset2, asset3, ...];
CTAssetsPageViewController *vc = [[CTAssetsPageViewController alloc]
initWithAssets:assets];
vc.pageIndex = assets.count - 1; // display the last asset
[self.navigationController pushViewController:vc animated:YES];
more Detail Visie Below Link :-
https://github.com/chiunam/CTAssetsPickerController