Skip to content

Commit d5a267e

Browse files
committed
release(0.3.0): upgraded Snapkit to 5.x / SwiftPM
1 parent 902e090 commit d5a267e

File tree

10 files changed

+58
-92
lines changed

10 files changed

+58
-92
lines changed

Package.resolved

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

Package.swift

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// swift-tools-version:5.3
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "UIKitExtensions",
8+
platforms: [
9+
.iOS(.v10)
10+
],
11+
products: [
12+
// Products define the executables and libraries a package produces, and make them visible to other packages.
13+
.library(
14+
name: "UIKitExtensions",
15+
targets: ["UIKitExtensions"]),
16+
],
17+
dependencies: [
18+
// Dependencies declare other packages that this package depends on.
19+
.package(url: "https://github.com/SnapKit/SnapKit.git", .upToNextMajor(from: "5.0.1"))
20+
],
21+
targets: [
22+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
23+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
24+
.target(
25+
name: "UIKitExtensions",
26+
dependencies: ["SnapKit"]),
27+
]
28+
)

Sources/UIKitExtensions/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
File renamed without changes.

UIKitExtensions/UIColorExtension.swift renamed to Sources/UIKitExtensions/UIColorExtension.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ public extension UIColor {
3030

3131
- Returns: UIColor
3232
*/
33-
public convenience init?(hexString: String) {
33+
convenience init?(hexString: String) {
3434
let r, g, b, a: CGFloat
3535

3636
if hexString.hasPrefix("#") {
3737
let start = hexString.index(hexString.startIndex, offsetBy: 1)
38-
let hexColor = hexString.substring(from: start)
38+
let hexColor = hexString[start...]
3939

40-
if hexColor.characters.count == 8 {
41-
let scanner = Scanner(string: hexColor)
40+
if hexColor.count == 8 {
41+
let scanner = Scanner(string: String(hexColor))
4242
var hexNumber: UInt64 = 0
4343

4444
if scanner.scanHexInt64(&hexNumber) {

UIKitExtensions/UIFontExtension.swift renamed to Sources/UIKitExtensions/UIFontExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public extension UIFont {
1818

1919
- Return: UIFont
2020
*/
21-
public static func fontNamed(_ customFontName: String, ofSize fontSize: CGFloat) -> UIFont {
21+
static func fontNamed(_ customFontName: String, ofSize fontSize: CGFloat) -> UIFont {
2222
return UIFont(name: customFontName, size: fontSize)!
2323
}
2424
}

UIKitExtensions.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'UIKitExtensions'
11-
s.version = '0.2.5'
11+
s.version = '0.3.0'
1212
s.summary = 'UIKitExtensions adds usefull features to UIKit classes.'
1313

1414
# This description is used to generate tags and improve search results.
@@ -28,9 +28,9 @@ UIKitExtensions adds usefull features to UIKit classes as fadeIn to UIView anima
2828
s.source = { :git => 'https://github.com/leloupnicolas/UIKitExtensions.git', :tag => s.version.to_s }
2929
# s.social_media_url = 'https://twitter.com/leloupnicolas'
3030

31-
s.ios.deployment_target = '8.0'
31+
s.ios.deployment_target = '10.0'
3232

33-
s.source_files = 'UIKitExtensions'
33+
s.source_files = 'Sources/UIKitExtensions'
3434

35-
s.dependency 'SnapKit', '~> 3.1.2'
35+
s.dependency 'SnapKit', '~> 5.0.0'
3636
end

UIKitExtensions/UIKitExtensions.xcodeproj/project.pbxproj

Lines changed: 0 additions & 76 deletions
This file was deleted.

UIKitExtensions/UIKitExtensions.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)