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

Support for iOS11/12, optional text label with image description #12

Open
wants to merge 14 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
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
RMGallery
=========
Changes from [original library](https://github.com/robotmedia/RMGallery):

* Support for iOS11/iOS12
* Displays (optional) text description alongside image at the bottom of screen
* Fixes library for iOS10 (agressive pre-fetching of collection view cells)
* iOS8 minimum target

---

[![Version](https://cocoapod-badges.herokuapp.com/v/RMGallery/badge.png)](http://cocoadocs.org/docsets/RMGallery) [![Platform](https://cocoapod-badges.herokuapp.com/p/RMGallery/badge.png)](http://cocoadocs.org/docsets/RMGallery) [![Build Status](https://travis-ci.org/robotmedia/RMGallery.png)](https://travis-ci.org/robotmedia/RMGallery)

A modular and lightweight gallery for iOS.
Expand All @@ -8,7 +17,7 @@ A modular and lightweight gallery for iOS.

RMGallery is a Photos-like gallery with no dependencies that can be used at view controller, view or cell level. It supports asynchronous image loading, view controller transitions, gestures and zooming.

##Features
## Features

* Displays a slideshow of images like the Photos app.
* Supports landscape and portrait orientations and handles rotations.
Expand All @@ -17,7 +26,7 @@ RMGallery is a Photos-like gallery with no dependencies that can be used at view
* Provides view controller transitions.
* Modular and extensible design.

##Installation
## Installation

Using [CocoaPods](http://cocoapods.org/):

Expand All @@ -27,17 +36,17 @@ pod 'RMGallery', '~> 0.1'

Alternatively, you can simply add the files from the [RMGallery](https://github.com/robotmedia/RMGallery/tree/master/RMGallery) directory to your project.

##Classes
## Classes

RMGallery handles the boilerplate of a gallery UI so you can focus in theming and implementing your custom layout. RMGallery can be used at cell, view or view controller level, each one with its own corresponding class.

###RMGalleryCell
### RMGalleryCell

[`RMGalleryCell`](https://github.com/robotmedia/RMGallery/blob/master/RMGallery/RMGalleryCell.h) is a collection view cell that displays an image with zoom and panning. It keeps the image centered when smaller than the cell and sets appropiate values for the zoom scale. Zoom can be toggled on and off at specific points.

The cell also has its own activity indicator view, which is animated by `RMGalleryView` while it waits for the image.

###RMGalleryView
### RMGalleryView

[`RMGalleryView`](https://github.com/robotmedia/RMGallery/blob/master/RMGallery/RMGalleryView.h) is a collection view of gallery cells in a flow layout. It has a data source (`RMGalleryViewDataSource`) that is responsible for providing images and a delegate (`RMGalleryViewDelegate`) that is notified of index changes.

Expand All @@ -49,25 +58,25 @@ Since `RMGalleryView` is a `UICollectionView` subclass, you also get all the ben

To display a full-screen gallery it's best to use `RMGalleryViewController`. If you don't need full-screen, you can use `RMGalleryView` directly.

###RMGalleryViewController
### RMGalleryViewController

[`RMGalleryViewController`](https://github.com/robotmedia/RMGallery/blob/master/RMGallery/RMGalleryViewController.h) is a view controller that manages a gallery view and, much like its counterparts `UITableViewController` and `UICollectionViewController`, is designed to be subclassed.

The gallery view controller gracefully handles device rotation, toggles the visibility of the status bar, navigation bar and toolbar and notifies of its own dismissal.

###RMGalleryTransition
### RMGalleryTransition

[`RMGalleryTransition`](https://github.com/robotmedia/RMGallery/blob/master/RMGallery/RMGalleryTransition.h) is a default view controller transition to go from a thumnail to the gallery view controller and back, as shown in the animation above. To use it you only need to to provide the position and image of the originating thumbnail (typically, an `UIImageView`).

##Requirements
## Requirements

RMGallery requires iOS 7.0 or above and ARC.

##Roadmap
## Roadmap

RMGallery is in initial development and its public API should not be considered stable.

##License
## License

Copyright 2014 [Robot Media SL](http://www.robotmedia.net)

Expand Down
51 changes: 48 additions & 3 deletions RMGallery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
68E0C1881D8BE3C0000406EF /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 68E0C1871D8BE3C0000406EF /* Launch Screen.storyboard */; };
8757EDFC18DC8466005BBC8E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8757EDFB18DC8466005BBC8E /* Foundation.framework */; };
8757EE0A18DC8466005BBC8E /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8757EE0918DC8466005BBC8E /* XCTest.framework */; };
8757EE0B18DC8466005BBC8E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8757EDFB18DC8466005BBC8E /* Foundation.framework */; };
Expand Down Expand Up @@ -71,6 +72,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
68E0C1871D8BE3C0000406EF /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
8757EDF818DC8466005BBC8E /* libRMGallery.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRMGallery.a; sourceTree = BUILT_PRODUCTS_DIR; };
8757EDFB18DC8466005BBC8E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
8757EE0818DC8466005BBC8E /* RMGalleryTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RMGalleryTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -247,6 +249,7 @@
8757EE2D18DC8495005BBC8E /* InfoPlist.strings */,
8757EE3018DC8495005BBC8E /* main.m */,
8757EE3218DC8495005BBC8E /* RMGalleryDemo-Prefix.pch */,
68E0C1871D8BE3C0000406EF /* Launch Screen.storyboard */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand Down Expand Up @@ -337,19 +340,23 @@
8757EDF018DC8466005BBC8E /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0510;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "Robot Media";
TargetAttributes = {
8757EE0718DC8466005BBC8E = {
TestTargetID = 8757EE2418DC8495005BBC8E;
};
8757EE2418DC8495005BBC8E = {
DevelopmentTeam = 24W6LC7R8F;
};
};
};
buildConfigurationList = 8757EDF318DC8466005BBC8E /* Build configuration list for PBXProject "RMGallery" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 8757EDEF18DC8466005BBC8E;
Expand Down Expand Up @@ -381,6 +388,7 @@
8757EE6518DC89E4005BBC8E /* photo3.jpg in Resources */,
8757EE2F18DC8495005BBC8E /* InfoPlist.strings in Resources */,
8757EE6418DC89E4005BBC8E /* photo2.jpg in Resources */,
68E0C1881D8BE3C0000406EF /* Launch Screen.storyboard in Resources */,
87A5FE5E18FEDA6900237AF5 /* thumbnail3.jpg in Resources */,
87A5FE5F18FEDA6900237AF5 /* [email protected] in Resources */,
87A5FE5D18FEDA6900237AF5 /* [email protected] in Resources */,
Expand Down Expand Up @@ -472,17 +480,31 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand All @@ -495,7 +517,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
Expand All @@ -509,24 +531,37 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand All @@ -538,6 +573,7 @@
DSTROOT = /tmp/RMGallery.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -550,6 +586,7 @@
DSTROOT = /tmp/RMGallery.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -572,6 +609,7 @@
"$(inherited)",
);
INFOPLIST_FILE = "RMGalleryTests/RMGalleryTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "net.robotmedia.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
Expand All @@ -590,6 +628,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = "RMGalleryTests/RMGalleryTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "net.robotmedia.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
Expand All @@ -602,6 +641,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 24W6LC7R8F;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
Expand All @@ -613,6 +653,8 @@
"$(inherited)",
);
INFOPLIST_FILE = "RMGalleryDemo/RMGalleryDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
PRODUCT_BUNDLE_IDENTIFIER = "net.robotmedia.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
Expand All @@ -625,13 +667,16 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 24W6LC7R8F;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RMGalleryDemo/RMGalleryDemo-Prefix.pch";
INFOPLIST_FILE = "RMGalleryDemo/RMGalleryDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
PRODUCT_BUNDLE_IDENTIFIER = "net.robotmedia.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
22 changes: 17 additions & 5 deletions RMGallery.xcodeproj/xcshareddata/xcschemes/RMGallery.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0510"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -23,10 +23,10 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,24 +39,36 @@
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8757EDF718DC8466005BBC8E"
BuildableName = "libRMGallery.a"
BlueprintName = "RMGallery"
ReferencedContainer = "container:RMGallery.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
Expand Down
Loading