a simple photo browser
- use cocoapods
pod 'LPPhotoViewer', '~> 0.0.6'
- manual import
just download lib folder and add into your project
- initialize imgae url array or UIImage objs
self.urlArrays = [[NSMutableArray alloc] init];
self.imgArrays = [[NSMutableArray alloc] init];
[self.urlArrays addObject:@"https://drscdn.500px.org/photo/42393810/q=80_m=2000/fed5ccbf106c289f62e5762df92f1438"];
[self.urlArrays addObject:@"https://drscdn.500px.org/photo/146441995/q=80_m=2000/0a6e687c0750ea05abf709bbd8c3d7f8"];
[self.urlArrays addObject:@"https://drscdn.500px.org/photo/146512755/q=80_m=2000_k=1/62c584ed280fb11bbdb7d1c5451b6676"];
[self.urlArrays addObject:@"https://drscdn.500px.org/photo/146409463/q=80_m=2000/9658bd373b7f84799dda05253d404a5d"];
[self.imgArrays addObject:[UIImage imageNamed:@"carousel01"]];
[self.imgArrays addObject:[UIImage imageNamed:@"carousel02"]];
[self.imgArrays addObject:[UIImage imageNamed:@"carousel03"]];
- set properties for LPPhotoViewer
LPPhotoViewer *pvc = [[LPPhotoViewer alloc] init];
// 1. for image urls
pvc.imgArr = self.urlArrays;
// 2. for UIImage objs
pvc.imgArr = self.imgArrays;
/** for custom properties */
// 1. show from specify index
pvc.currentIndex = 2;
// 2. indicatorType: IndicatorTypeNumLabel or IndicatorTypePageControl or none
pvc.indicatorType = IndicatorTypeNumLabel;
- present LPPhotoViewer
[self presentViewController:pvc animated:YES completion:nil];
LPPhotoViewer will upgrade to 1.x & Swift3 which will be much better performance soon
add fade in transition effect & fade out drag effect
new progress view & drag bugfix
add vertical drag gesture for dismiss
add zoom reset fix
add pageControl indicate type
first commit