Skip to content

Commit

Permalink
Merge pull request #6 from adboco/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
adboco authored Jun 5, 2018
2 parents c490bd9 + 03b0bbf commit 037244b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0
2 changes: 1 addition & 1 deletion Example/Utils/UIViewControllerExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extension UIViewController {
basicAnimation?.duration = 1.0
basicAnimation?.isRemovedOnCompletion = false
basicAnimation?.fromValue = gradientLayer?.colors
basicAnimation?.toValue = toColors.flatMap({ $0.cgColor })
basicAnimation?.toValue = toColors.compactMap({ $0.cgColor })

guard let gradient = gradientLayer, let animation = basicAnimation else {
return
Expand Down
2 changes: 1 addition & 1 deletion Unsplasher/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.0.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion Unsplasher/Unsplash/Requests/CollectionRequests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ final public class CollectionRequests: Paginable {
parameters["per_page"] = perPage
}
let url = Unsplash.collectionsURLString + (curated ? "/curated/\(collectionId)" : "/\(collectionId)") + "/photos"
self.manager.request(url: url, expectedType: [Photo].self, completion: completion)
self.manager.request(url: url, parameters: parameters, expectedType: [Photo].self, completion: completion)
}

/// Get a list of collections related with a given one
Expand Down
2 changes: 1 addition & 1 deletion Unsplasher/Unsplash/Requests/PhotoRequests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ final public class PhotoRequests: Paginable {
parameters["h"] = height
}
if let rect = rect {
let dimensions = rect.split(separator: ",").flatMap({ UInt32($0) })
let dimensions = rect.split(separator: ",").compactMap({ UInt32($0) })
if dimensions.count == 4 {
parameters["rect"] = rect
}
Expand Down
2 changes: 1 addition & 1 deletion Unsplasher/Utils/StringExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension String {
do {
let regex = try NSRegularExpression(pattern: self)
let results = regex.matches(in: text, range: NSRange(text.startIndex..., in: text))
return results.flatMap {
return results.compactMap {
String(text[Range($0.range, in: text)!])
}
} catch let error {
Expand Down
2 changes: 1 addition & 1 deletion UnsplasherSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "UnsplasherSDK"
s.version = "1.0.2"
s.version = "1.0.3"
s.summary = "Unsplash API client written in Swift."

# This description is used to generate tags and improve search results.
Expand Down

0 comments on commit 037244b

Please sign in to comment.