Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini previews at the bottom of the MHGalleryImageViewerViewController #150

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions MHVideoPhotoGallery.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'MHVideoPhotoGallery'
s.version = '2.1.3'
s.version = '2.1.4'
s.license = 'MIT'
s.homepage = 'https://github.com/mariohahn/MHVideoPhotoGallery'
s.author = {
Expand All @@ -9,8 +9,8 @@ Pod::Spec.new do |s|
s.summary = 'Gallery for iOS 7 Devices.'
s.platform = :ios
s.source = {
:git => 'https://github.com/mariohahn/MHVideoPhotoGallery.git',
:tag => 'v2.1.3'
:git => 'https://github.com/vibe0508/MHVideoPhotoGallery.git',
:tag => 'v2.1.4'
}

s.dependency 'SDWebImage'
Expand All @@ -24,4 +24,4 @@ Pod::Spec.new do |s|
s.source_files = ['MHVideoPhotoGallery/MMHVideoPhotoGallery/**/*.{h,m}']
s.ios.deployment_target = '7.0'
s.requires_arc = true
end
end
67 changes: 35 additions & 32 deletions MHVideoPhotoGallery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
CCE50708F0B1B954A1D43543 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 48BEA0714A525E3C516EBDBD /* libPods.a */; };
914975EDCD2CBBF7C8288BC7 /* libPods-MHVideoPhotoGallery.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDF7702A0A93ACA6C5441553 /* libPods-MHVideoPhotoGallery.a */; };
F514263518911D8E0091E3DF /* 707-albums-selected.png in Resources */ = {isa = PBXBuildFile; fileRef = F514263318911D8E0091E3DF /* 707-albums-selected.png */; };
F514263618911D8E0091E3DF /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F514263418911D8E0091E3DF /* [email protected] */; };
F514263918911D920091E3DF /* 705-photos-selected.png in Resources */ = {isa = PBXBuildFile; fileRef = F514263718911D920091E3DF /* 705-photos-selected.png */; };
Expand Down Expand Up @@ -108,9 +108,13 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
48BEA0714A525E3C516EBDBD /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
7034C256C78A0FAB4D812A2B /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
A1831E23B84EF67E23139C0E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
1275C4CE8C1CA45FB4B7FCBC /* Pods-MHVideoPhotoGallery.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MHVideoPhotoGallery.release.xcconfig"; path = "Pods/Target Support Files/Pods-MHVideoPhotoGallery/Pods-MHVideoPhotoGallery.release.xcconfig"; sourceTree = "<group>"; };
7C603BB9E1AAF8E1BD47840D /* Pods-MHVideoPhotoGallery.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MHVideoPhotoGallery.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MHVideoPhotoGallery/Pods-MHVideoPhotoGallery.debug.xcconfig"; sourceTree = "<group>"; };
DABACC5D1E45331F00602E1B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
DABACC5E1E45332100602E1B /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
DABACC5F1E45332300602E1B /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
DABACC601E45332700602E1B /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
DDF7702A0A93ACA6C5441553 /* libPods-MHVideoPhotoGallery.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MHVideoPhotoGallery.a"; sourceTree = BUILT_PRODUCTS_DIR; };
F514263318911D8E0091E3DF /* 707-albums-selected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "707-albums-selected.png"; sourceTree = "<group>"; };
F514263418911D8E0091E3DF /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
F514263718911D920091E3DF /* 705-photos-selected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "705-photos-selected.png"; sourceTree = "<group>"; };
Expand All @@ -126,7 +130,6 @@
F53F924517EB008100A9FE6A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
F53F924717EB008100A9FE6A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
F53F924B17EB008100A9FE6A /* MHVideoPhotoGallery-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MHVideoPhotoGallery-Info.plist"; sourceTree = "<group>"; };
F53F924D17EB008100A9FE6A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F53F924F17EB008100A9FE6A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
F53F925117EB008100A9FE6A /* MHVideoPhotoGallery-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MHVideoPhotoGallery-Prefix.pch"; sourceTree = "<group>"; };
F53F925217EB008100A9FE6A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -222,11 +225,8 @@
F5D24FFC1885CDDD004D97CA /* ExampleViewControllerTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleViewControllerTableView.m; sourceTree = "<group>"; };
F5D24FFE1885D3D7004D97CA /* ExampleViewControllerImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleViewControllerImageView.h; sourceTree = "<group>"; };
F5D24FFF1885D3D7004D97CA /* ExampleViewControllerImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleViewControllerImageView.m; sourceTree = "<group>"; };
F5D9AB4918B61E390014AAC6 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F5D9AB4A18B61E390014AAC6 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F5D9AB4B18B6220C0014AAC6 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F5D9AB4C18B6220C0014AAC6 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F5D9AB4E18B6658A0014AAC6 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F5D9AB4F18B6658A0014AAC6 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F5D9AB5018B665A80014AAC6 /* MHGallery.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = MHGallery.bundle; path = MMHVideoPhotoGallery/MHGallery.bundle; sourceTree = "<group>"; };
F5DBBF2C187D582000BEFE29 /* MHUIImageViewContentViewAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MHUIImageViewContentViewAnimation.h; path = MMHVideoPhotoGallery/MHUIImageViewContentViewAnimation/MHUIImageViewContentViewAnimation.h; sourceTree = "<group>"; };
Expand All @@ -248,7 +248,7 @@
F53F924617EB008100A9FE6A /* CoreGraphics.framework in Frameworks */,
F53F924817EB008100A9FE6A /* UIKit.framework in Frameworks */,
F53F924417EB008100A9FE6A /* Foundation.framework in Frameworks */,
CCE50708F0B1B954A1D43543 /* libPods.a in Frameworks */,
914975EDCD2CBBF7C8288BC7 /* libPods-MHVideoPhotoGallery.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -265,11 +265,11 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
64EBA583430CC00734798E3D /* Pods */ = {
48ED43EAF27151C800B9609A /* Pods */ = {
isa = PBXGroup;
children = (
7034C256C78A0FAB4D812A2B /* Pods.debug.xcconfig */,
A1831E23B84EF67E23139C0E /* Pods.release.xcconfig */,
7C603BB9E1AAF8E1BD47840D /* Pods-MHVideoPhotoGallery.debug.xcconfig */,
1275C4CE8C1CA45FB4B7FCBC /* Pods-MHVideoPhotoGallery.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
Expand All @@ -281,7 +281,7 @@
F53F926817EB008100A9FE6A /* MHVideoPhotoGalleryTests */,
F53F924217EB008100A9FE6A /* Frameworks */,
F53F924117EB008100A9FE6A /* Products */,
64EBA583430CC00734798E3D /* Pods */,
48ED43EAF27151C800B9609A /* Pods */,
);
sourceTree = "<group>";
};
Expand All @@ -303,7 +303,7 @@
F53F924517EB008100A9FE6A /* CoreGraphics.framework */,
F53F924717EB008100A9FE6A /* UIKit.framework */,
F53F926217EB008100A9FE6A /* XCTest.framework */,
48BEA0714A525E3C516EBDBD /* libPods.a */,
DDF7702A0A93ACA6C5441553 /* libPods-MHVideoPhotoGallery.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -608,12 +608,12 @@
isa = PBXNativeTarget;
buildConfigurationList = F53F927217EB008100A9FE6A /* Build configuration list for PBXNativeTarget "MHVideoPhotoGallery" */;
buildPhases = (
75DDE8B2C1B33F486A5B8488 /* Check Pods Manifest.lock */,
6D82B4507816821052C7125C /* [CP] Check Pods Manifest.lock */,
F53F923C17EB008100A9FE6A /* Sources */,
F53F923D17EB008100A9FE6A /* Frameworks */,
F53F923E17EB008100A9FE6A /* Resources */,
0C519C9D844EB0B45067DB4C /* Embed Pods Frameworks */,
87746AA85625C06CC49A954C /* Copy Pods Resources */,
154DE1A8AB3006705A727A0A /* [CP] Embed Pods Frameworks */,
DFD69ABFEC3ABB13B89F14B1 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -748,49 +748,52 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
0C519C9D844EB0B45067DB4C /* Embed Pods Frameworks */ = {
154DE1A8AB3006705A727A0A /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MHVideoPhotoGallery/Pods-MHVideoPhotoGallery-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
75DDE8B2C1B33F486A5B8488 /* Check Pods Manifest.lock */ = {
6D82B4507816821052C7125C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-MHVideoPhotoGallery-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
87746AA85625C06CC49A954C /* Copy Pods Resources */ = {
DFD69ABFEC3ABB13B89F14B1 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MHVideoPhotoGallery/Pods-MHVideoPhotoGallery-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -854,10 +857,10 @@
F53F924C17EB008100A9FE6A /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
F53F924D17EB008100A9FE6A /* en */,
F5D9AB4918B61E390014AAC6 /* de */,
F5D9AB4B18B6220C0014AAC6 /* fr */,
F5D9AB4E18B6658A0014AAC6 /* es */,
DABACC5D1E45331F00602E1B /* en */,
DABACC5E1E45332100602E1B /* de */,
DABACC5F1E45332300602E1B /* fr */,
DABACC601E45332700602E1B /* es */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
Expand Down Expand Up @@ -949,7 +952,7 @@
};
F53F927317EB008100A9FE6A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7034C256C78A0FAB4D812A2B /* Pods.debug.xcconfig */;
baseConfigurationReference = 7C603BB9E1AAF8E1BD47840D /* Pods-MHVideoPhotoGallery.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
Expand All @@ -969,7 +972,7 @@
};
F53F927417EB008100A9FE6A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A1831E23B84EF67E23139C0E /* Pods.release.xcconfig */;
baseConfigurationReference = 1275C4CE8C1CA45FB4B7FCBC /* Pods-MHVideoPhotoGallery.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ - (void)viewDidLoad
tailored.attributedTitle = title;
tailored2.attributedString = string2;

self.galleryDataSource = @[@[tailored,tailored2]];
self.galleryDataSource = @[@[tailored,tailored2, tailored3]];
self.tableView.backgroundColor = [UIColor colorWithRed:0.83 green:0.84 blue:0.86 alpha:1];
[self.tableView reloadData];

Expand Down
14 changes: 11 additions & 3 deletions MHVideoPhotoGallery/ExampleViewControllerTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "ExampleViewControllerTableView.h"
#import "MHOverviewController.h"
#import "MHCustomization.h"
#import "UIImageView+WebCache.h"

@implementation ImageTableViewCell
Expand All @@ -28,10 +29,13 @@ - (void)viewDidLoad



MHGalleryItem *tailored = [[MHGalleryItem alloc]initWithURL:@"http://www.tailored-apps.com/wp-content/uploads/2014/01/wien_cropped-350x300.jpg"
galleryType:MHGalleryTypeImage];
MHGalleryItem *tailored = [MHGalleryItem.alloc initWithURL:@"http://www.tailored-apps.com/wp-content/uploads/2014/01/wien_cropped-350x300.jpg"
galleryType:MHGalleryTypeImage];

self.galleryDataSource = @[tailored];
MHGalleryItem *tailored2 = [MHGalleryItem.alloc initWithURL:@"http://www.tailored-apps.com/wp-content/uploads/2014/01/hannes.jpg"
galleryType:MHGalleryTypeImage];

self.galleryDataSource = @[tailored, tailored2];

}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
Expand Down Expand Up @@ -69,6 +73,10 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *
gallery.presentingFromImageView = imageView;
gallery.presentationIndex = indexPath.row;

MHUICustomization *customization = [MHUICustomization new];
customization.showMiniViews = YES;
gallery.UICustomization = customization;

__weak MHGalleryController *blockGallery = gallery;

gallery.finishedCallback = ^(NSInteger currentIndex,UIImage *image,MHTransitionDismissMHGallery *interactiveTransition,MHGalleryViewMode viewMode){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "705-photos-selected.png"
"filename" : "705-photos-selected.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "707-albums-selected.png"
"filename" : "707-albums-selected.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "750-home-selected.png"
"filename" : "750-home-selected.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Loading