CocoaPods trunk is moving to be read-only. Read more on the blog, there are 7 months to go.
| TestsTested | ✓ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Sep 2015 |
Maintained by DevDivinity.
| Depends on: | |
| AFNetworking | >= 0 |
| DACircularProgress | >= 0 |
| pop | >= 0 |
To run the example project, clone the repo, and run pod install from the Example directory first.
See the code snippet below for an example of how to implement the photo browser.
First create a photos array containing IDMPhoto objects:
photo = [IDMPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"newPhoto" ofType:@"jpg"]];
photo.captionFont = [UIFont fontWithName:@"verdana" size:14];
photo.titleFont = [UIFont fontWithName:@"Arial" size:20];
photo.title = @"Dev Divinity";
photo.caption = @"The London Eye is a giant Ferris ";
[photos addObject:photo];There are two main ways to presente the photoBrowser, with a fade on screen or with a zooming effect from an existing view.
Using a simple fade transition:
IDMPhotoBrowser *browser = [[IDMPhotoBrowser alloc] initWithPhotos:photos];Zooming effect from a view:
IDMPhotoBrowser *browser = [[IDMPhotoBrowser alloc] initWithPhotos:photos animatedFromView:sender];When using this animation you can set the scaleImage property, in case the image from the view is not the same as the one that will be shown on the browser, so it will dynamically scale it:
browser.scaleImage = buttonSender.currentImage;Presenting using a modal view controller:
[self presentViewController:browser animated:YES completion:nil];FSPhotoBrowser is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "FSPhotoBrowser"DevDivinity
FSPhotoBrowser is available under the MIT license. See the LICENSE file for more info.