Skip to content

Commit 049bd96

Browse files
committed
fix for iOS8
1 parent aff2663 commit 049bd96

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

CollectionViewCenteredFlowLayout.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "1.0.0"
1+
version = "1.0.1"
22

33
Pod::Spec.new do |s|
44
s.name = 'CollectionViewCenteredFlowLayout'

CollectionViewCenteredFlowLayout/CollectionViewCenteredFlowLayout.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ open class CollectionViewCenteredFlowLayout: UICollectionViewFlowLayout {
4545
}
4646
let currentItemAttributes = layoutAttributes.copy() as! UICollectionViewLayoutAttributes
4747
// if the current frame, once stretched to the full row doesn't intersect the previous frame then they are on different rows
48-
if previousFrame != nil && !currentItemAttributes.frame.intersects(CGRect(x: -.infinity, y: previousFrame!.origin.y, width: .infinity, height: previousFrame!.size.height)) {
48+
if previousFrame != nil && !currentItemAttributes.frame.intersects(CGRect(x: -.greatestFiniteMagnitude, y: previousFrame!.origin.y, width: .infinity, height: previousFrame!.size.height)) {
4949
cells.append([])
5050
}
5151
cells[cells.endIndex - 1].append(currentItemAttributes)
@@ -74,7 +74,7 @@ open class CollectionViewCenteredFlowLayout: UICollectionViewFlowLayout {
7474
}
7575
let currentItemAttributes = layoutAttributes.copy() as! UICollectionViewLayoutAttributes
7676
// if the current frame, once stretched to the full column doesn't intersect the previous frame then they are on different columns
77-
if previousFrame != nil && !currentItemAttributes.frame.intersects(CGRect(x: previousFrame!.origin.x, y: -.infinity, width: previousFrame!.size.width, height: .infinity)) {
77+
if previousFrame != nil && !currentItemAttributes.frame.intersects(CGRect(x: previousFrame!.origin.x, y: -.greatestFiniteMagnitude, width: previousFrame!.size.width, height: .infinity)) {
7878
cells.append([])
7979
}
8080
cells[cells.endIndex - 1].append(currentItemAttributes)

Example/CollectionViewCenteredFlowLayout.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@
339339
buildSettings = {
340340
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
341341
INFOPLIST_FILE = Example/Info.plist;
342+
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
342343
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
343344
PRODUCT_BUNDLE_IDENTIFIER = com.coeur.ios.CollectionViewCenteredFlowLayout;
344345
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -352,6 +353,7 @@
352353
buildSettings = {
353354
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
354355
INFOPLIST_FILE = Example/Info.plist;
356+
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
355357
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
356358
PRODUCT_BUNDLE_IDENTIFIER = com.coeur.ios.CollectionViewCenteredFlowLayout;
357359
PRODUCT_NAME = "$(TARGET_NAME)";

Example/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- CollectionViewCenteredFlowLayout (1.0.0)
2+
- CollectionViewCenteredFlowLayout (1.0.1)
33

44
DEPENDENCIES:
55
- CollectionViewCenteredFlowLayout (from `..`)
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
99
:path: ".."
1010

1111
SPEC CHECKSUMS:
12-
CollectionViewCenteredFlowLayout: 446fcaeb54eee1abbb902c50caac6b2fdcfe3b83
12+
CollectionViewCenteredFlowLayout: b95892ba0c0d047e348eb0b64c4ee5b52ff0bf9b
1313

1414
PODFILE CHECKSUM: 3fa6777a7a1e9edde6c8ce74fd0509ef089b71f2
1515

Example/Pods/Local Podspecs/CollectionViewCenteredFlowLayout.podspec.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/CollectionViewCenteredFlowLayout/Info.plist

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)