Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c46614c
animate in x direction
hani-ibrahim Aug 15, 2017
6e88695
Merge pull request #28 from hani-ibrahim/master
m1entus Aug 16, 2017
fe2f190
Convert to Swift 4
andreaantonioni Aug 29, 2017
e053a45
Update for swift4
m1entus Sep 1, 2017
bb22ad9
Calling updateCurrentPhotosInformation in viewDidAppear because popul…
Sep 2, 2017
5c12f3c
Merge pull request #29 from andreaantonioni/swift4
m1entus Sep 21, 2017
041f0a1
Merge pull request #30 from HristiyanZahariev/master
m1entus Sep 21, 2017
4c3ec2a
Merge branch 'swift4'
m1entus Sep 21, 2017
55eaecf
Update swift version
m1entus Sep 21, 2017
89d9e0b
Fix compile issues for swift 3.2
m1entus Sep 21, 2017
3c460d9
Finally fix swift 3.2 issues
m1entus Sep 25, 2017
6d582d1
Add public private set for photos
m1entus Oct 2, 2017
269402f
Support iPhone X layout
wallacesky Nov 30, 2017
0b5897a
Merge pull request #37 from wallacesky/j-1.2.3
m1entus Dec 4, 2017
1607444
Release version
m1entus Feb 8, 2018
4a593e4
Fix: #38 Unable to change title
m1entus Feb 8, 2018
f5dd5b3
Fix: #34 INSPhotosViewController datasource public?
m1entus Feb 8, 2018
214c6e4
Fix: #40 Is there a way to hide the share button in the navigation bar?
m1entus Feb 8, 2018
0a0efe5
Change podspec
m1entus Feb 8, 2018
ea7f54f
add project symbol link to root folder
Feb 28, 2018
0e8b3ee
add shared scheme
Feb 28, 2018
b22b3b8
Merge pull request #42 from Igor-Palaguta/Carthage-Support
m1entus Feb 28, 2018
ec4e411
disable flick-to-dismiss, if current orientation is different from su…
anneWe Apr 11, 2018
d8e2f1a
Merge pull request #47 from anneWe/fix/rotation-dismiss-issue
m1entus Apr 15, 2018
0314753
Added a confirmation dialog to photo deletion.
spencerwhyte Jul 25, 2018
6425e5c
Merge pull request #54 from spencerwhyte/master
m1entus Jul 26, 2018
4d767b6
Update version
m1entus Jul 26, 2018
a0d45a1
Added Carthage support
vdeep Sep 6, 2018
c638b43
Unshared INSPhotoGalleryFramework scheme in INSPhotoGallery.xcworkspace
vdeep Sep 6, 2018
c9be542
Changed framework project version back to 1
vdeep Sep 6, 2018
32d49fb
Project configuration changes
vdeep Sep 6, 2018
105aa0a
Merge pull request #56 from vdeep/carthage
m1entus Sep 7, 2018
67c8537
add parameter to interface for max zoom scale control
Oct 8, 2018
fe29255
Merge pull request #60 from anneWe/feature/zoom-configuration
m1entus Oct 8, 2018
d4b8e57
Added support for Swift 4.2. Closes #58.
spencerwhyte Oct 9, 2018
78fa316
Merge pull request #61 from spencerwhyte/master
m1entus Oct 10, 2018
6ca72b5
Update specs
m1entus Oct 15, 2018
16a69ee
swift5
SergeyPetrachkov Mar 28, 2019
657f200
update specs
SergeyPetrachkov Mar 28, 2019
0fe482c
Merge pull request #63 from SergeyPetrachkov/swift5
m1entus Mar 28, 2019
c65221a
Update for sift 5.0
m1entus Mar 28, 2019
25cf545
SPM support
igorkulman Oct 4, 2019
f0a89f5
Merge pull request #69 from igorkulman/master
m1entus Oct 5, 2019
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
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
5.0
60 changes: 35 additions & 25 deletions Example/INSPhotoGallery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@
D2EF35EF1CB288F300033131 /* Resources */,
642427321CDE10750037E8DA /* Embed Frameworks */,
AD54B7D6CFDA54F486B6350B /* [CP] Embed Pods Frameworks */,
17D7FE4374E94EE2F6A42339 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -256,22 +255,22 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Inspace Labs Sp z o. o. Spółka Komandytowa";
TargetAttributes = {
642427251CDE10740037E8DA = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1020;
};
D2EF35F01CB288F300033131 = {
CreatedOnToolsVersion = 7.3;
LastSwiftMigration = 0800;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = D2EF35EC1CB288F300033131 /* Build configuration list for PBXProject "INSPhotoGallery" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -311,34 +310,22 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
17D7FE4374E94EE2F6A42339 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-INSPhotoGallery/Pods-INSPhotoGallery-resources.sh\"\n";
showEnvVarsInLog = 0;
};
430D737234B234F1BDA3BFFA /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-INSPhotoGallery-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;
};
AD54B7D6CFDA54F486B6350B /* [CP] Embed Pods Frameworks */ = {
Expand All @@ -347,9 +334,14 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-INSPhotoGallery/Pods-INSPhotoGallery-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/INSNibLoading/INSNibLoading.framework",
"${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/INSNibLoading.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -437,7 +429,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -461,7 +453,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.inspace.INSPhotoGalleryFramework;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -472,19 +464,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
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;
Expand Down Expand Up @@ -519,19 +520,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
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;
Expand Down Expand Up @@ -568,7 +578,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.inspace.INSPhotoGallery;
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)_Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -584,7 +594,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.inspace.INSPhotoGallery;
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)_Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>INSPhotoGalleryFramework.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>INSPhotoGalleryFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
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>
2 changes: 1 addition & 1 deletion Example/INSPhotoGallery/CustomModelViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extension CustomModelViewController: UICollectionViewDataSource, UICollectionVie
let galleryPreview = INSPhotosViewController(photos: photos, initialPhoto: currentPhoto, referenceView: cell)

galleryPreview.referenceViewForPhotoWhenDismissingHandler = { [weak self] photo in
if let index = self?.photos.index(where: {$0 === photo}) {
if let index = self?.photos.firstIndex(where: {$0 === photo}) {
let indexPath = IndexPath(item: index, section: 0)
let cell = collectionView.cellForItem(at: indexPath) as? ExampleCollectionViewCell
return cell
Expand Down
4 changes: 4 additions & 0 deletions Example/INSPhotoGallery/CustomPhotoModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class CustomPhotoModel: NSObject, INSPhotoViewable {
var thumbnailImageURL: URL?

var attributedTitle: NSAttributedString? {
#if swift(>=4.0)
return NSAttributedString(string: "Example caption text", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white])
#else
return NSAttributedString(string: "Example caption text", attributes: [NSForegroundColorAttributeName: UIColor.white])
#endif
}

init(image: UIImage?, thumbnailImage: UIImage?) {
Expand Down
8 changes: 6 additions & 2 deletions Example/INSPhotoGallery/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ class ViewController: UIViewController {

for photo in photos {
if let photo = photo as? INSPhoto {
photo.attributedTitle = NSAttributedString(string: "Example caption text\ncaption text", attributes: [NSForegroundColorAttributeName: UIColor.white])
#if swift(>=4.0)
photo.attributedTitle = NSAttributedString(string: "Example caption text\ncaption text", attributes: [NSAttributedString.Key.foregroundColor: UIColor.white])
#else
photo.attributedTitle = NSAttributedString(string: "Example caption text\ncaption text", attributes: [NSForegroundColorAttributeName: UIColor.white])
#endif
}
}
}
Expand All @@ -59,7 +63,7 @@ extension ViewController: UICollectionViewDataSource, UICollectionViewDelegateFl
}

galleryPreview.referenceViewForPhotoWhenDismissingHandler = { [weak self] photo in
if let index = self?.photos.index(where: {$0 === photo}) {
if let index = self?.photos.firstIndex(where: {$0 === photo}) {
let indexPath = IndexPath(item: index, section: 0)
return collectionView.cellForItem(at: indexPath) as? ExampleCollectionViewCell
}
Expand Down
15 changes: 10 additions & 5 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
PODS:
- INSNibLoading (1.0.1)
- Kingfisher (3.0.1)
- INSNibLoading (1.0.2)
- Kingfisher (4.8.1)

DEPENDENCIES:
- INSNibLoading
- Kingfisher

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- INSNibLoading
- Kingfisher

SPEC CHECKSUMS:
INSNibLoading: 1b8d0ee31b94c124bffe2609e697e0a43117a78f
Kingfisher: d5a491b45ea453d90a31bd2c0831d5243e73a73f
INSNibLoading: 0244d5b9c30d4642c77b31469cbfd905e8b1efb3
Kingfisher: 868c1149679a7ab6869be118faa9b5aed154aaf0

PODFILE CHECKSUM: 65ef0a362e355fd18c77f31b51039f3d5b311896

COCOAPODS: 1.0.1
COCOAPODS: 1.5.0
2 changes: 1 addition & 1 deletion Example/Pods/Kingfisher/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading