Skip to content

Commit f138a28

Browse files
authored
Merge pull request #15 from devxoul/swift-5.0
Let's Swift 5.0 πŸš€
2 parents 88f95b1 + 6c50379 commit f138a28

File tree

6 files changed

+18
-22
lines changed

6 files changed

+18
-22
lines changed

β€Ž.swift-versionβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€ŽREADME.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SwiftyImage
22
===========
33

4-
![Swift](https://img.shields.io/badge/Swift-4.2-orange.svg)
4+
![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)
55
[![CocoaPods](http://img.shields.io/cocoapods/v/SwiftyImage.svg?style=flat)](https://cocoapods.org/pods/SwiftyImage)
66

77
The most sexy way to use images in Swift.

β€ŽSources/SwiftyImage.swiftβ€Ž

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ public enum BorderAlignment {
1919

2020
public extension UIImage {
2121

22-
public typealias ContextBlock = (CGContext) -> Void
22+
typealias ContextBlock = (CGContext) -> Void
2323

24-
public class func with(width: CGFloat, height: CGFloat, block: ContextBlock) -> UIImage {
24+
class func with(width: CGFloat, height: CGFloat, block: ContextBlock) -> UIImage {
2525
return self.with(size: CGSize(width: width, height: height), block: block)
2626
}
2727

28-
public class func with(size: CGSize, opaque: Bool = false, scale: CGFloat = 0, block: ContextBlock) -> UIImage {
28+
class func with(size: CGSize, opaque: Bool = false, scale: CGFloat = 0, block: ContextBlock) -> UIImage {
2929
UIGraphicsBeginImageContextWithOptions(size, opaque, scale)
3030
let context = UIGraphicsGetCurrentContext()!
3131
block(context)
@@ -34,7 +34,7 @@ public extension UIImage {
3434
return image ?? UIImage()
3535
}
3636

37-
public func with(_ contextBlock: (CGContext) -> Void) -> UIImage! {
37+
func with(_ contextBlock: (CGContext) -> Void) -> UIImage! {
3838
return UIImage.with(size: self.size, opaque: false, scale: self.scale) { context in
3939
let rect = CGRect(x: 0, y: 0, width: self.size.width, height: self.size.height)
4040
self.draw(in: rect)
@@ -69,17 +69,17 @@ public func + (lhs: UIImage, rhs: UIImage) -> UIImage {
6969

7070
public extension UIImage {
7171

72-
public class func size(width: CGFloat, height: CGFloat) -> ImageDrawer {
72+
class func size(width: CGFloat, height: CGFloat) -> ImageDrawer {
7373
return self.size(CGSize(width: width, height: height))
7474
}
7575

76-
public class func size(_ size: CGSize) -> ImageDrawer {
76+
class func size(_ size: CGSize) -> ImageDrawer {
7777
let drawer = ImageDrawer()
7878
drawer.size = .fixed(size)
7979
return drawer
8080
}
8181

82-
public class func resizable() -> ImageDrawer {
82+
class func resizable() -> ImageDrawer {
8383
let drawer = ImageDrawer()
8484
drawer.size = .resizable
8585
return drawer
@@ -460,7 +460,7 @@ open class ImageDrawer {
460460

461461
public extension UIImage {
462462

463-
public func with(color: UIColor) -> UIImage {
463+
func with(color: UIColor) -> UIImage {
464464
return UIImage.with(size: self.size) { context in
465465
context.translateBy(x: 0, y: self.size.height)
466466
context.scaleBy(x: 1, y: -1)

β€ŽSwiftyImage.xcodeproj/project.pbxprojβ€Ž

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
isa = PBXProject;
194194
attributes = {
195195
LastSwiftUpdateCheck = 0700;
196-
LastUpgradeCheck = 1000;
196+
LastUpgradeCheck = 1020;
197197
ORGANIZATIONNAME = "Suyeol Jeon";
198198
TargetAttributes = {
199199
03B1193D1B54E2AB00427302 = {
@@ -211,10 +211,11 @@
211211
};
212212
buildConfigurationList = 03B119381B54E2AB00427302 /* Build configuration list for PBXProject "SwiftyImage" */;
213213
compatibilityVersion = "Xcode 3.2";
214-
developmentRegion = English;
214+
developmentRegion = en;
215215
hasScannedForEncodings = 0;
216216
knownRegions = (
217217
en,
218+
Base,
218219
);
219220
mainGroup = 03B119341B54E2AB00427302;
220221
productRefGroup = 03B1193F1B54E2AB00427302 /* Products */;
@@ -292,6 +293,7 @@
292293
isa = XCBuildConfiguration;
293294
buildSettings = {
294295
ALWAYS_SEARCH_USER_PATHS = NO;
296+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
295297
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
296298
CLANG_CXX_LIBRARY = "libc++";
297299
CLANG_ENABLE_MODULES = YES;
@@ -341,7 +343,7 @@
341343
ONLY_ACTIVE_ARCH = YES;
342344
SDKROOT = iphoneos;
343345
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
344-
SWIFT_VERSION = 3.0;
346+
SWIFT_VERSION = 5.0;
345347
TARGETED_DEVICE_FAMILY = "1,2";
346348
VERSIONING_SYSTEM = "apple-generic";
347349
VERSION_INFO_PREFIX = "";
@@ -352,6 +354,7 @@
352354
isa = XCBuildConfiguration;
353355
buildSettings = {
354356
ALWAYS_SEARCH_USER_PATHS = NO;
357+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
355358
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
356359
CLANG_CXX_LIBRARY = "libc++";
357360
CLANG_ENABLE_MODULES = YES;
@@ -393,7 +396,7 @@
393396
MTL_ENABLE_DEBUG_INFO = NO;
394397
SDKROOT = iphoneos;
395398
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
396-
SWIFT_VERSION = 3.0;
399+
SWIFT_VERSION = 5.0;
397400
TARGETED_DEVICE_FAMILY = "1,2";
398401
VALIDATE_PRODUCT = YES;
399402
VERSIONING_SYSTEM = "apple-generic";
@@ -417,7 +420,6 @@
417420
PRODUCT_NAME = SwiftyImage;
418421
SKIP_INSTALL = YES;
419422
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
420-
SWIFT_VERSION = 4.2;
421423
};
422424
name = Debug;
423425
};
@@ -436,7 +438,6 @@
436438
PRODUCT_BUNDLE_IDENTIFIER = "kr.xoul.$(PRODUCT_NAME:rfc1034identifier)";
437439
PRODUCT_NAME = SwiftyImage;
438440
SKIP_INSTALL = YES;
439-
SWIFT_VERSION = 4.2;
440441
};
441442
name = Release;
442443
};
@@ -453,7 +454,6 @@
453454
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
454455
PRODUCT_BUNDLE_IDENTIFIER = "kr.xoul.$(PRODUCT_NAME:rfc1034identifier)";
455456
PRODUCT_NAME = "$(TARGET_NAME)";
456-
SWIFT_VERSION = 4.2;
457457
};
458458
name = Debug;
459459
};
@@ -466,7 +466,6 @@
466466
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
467467
PRODUCT_BUNDLE_IDENTIFIER = "kr.xoul.$(PRODUCT_NAME:rfc1034identifier)";
468468
PRODUCT_NAME = "$(TARGET_NAME)";
469-
SWIFT_VERSION = 4.2;
470469
};
471470
name = Release;
472471
};
@@ -499,7 +498,6 @@
499498
SDKROOT = appletvos;
500499
SKIP_INSTALL = YES;
501500
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
502-
SWIFT_VERSION = 4.2;
503501
TARGETED_DEVICE_FAMILY = 3;
504502
TVOS_DEPLOYMENT_TARGET = 9.0;
505503
};
@@ -532,7 +530,6 @@
532530
PRODUCT_NAME = SwiftyImage;
533531
SDKROOT = appletvos;
534532
SKIP_INSTALL = YES;
535-
SWIFT_VERSION = 4.2;
536533
TARGETED_DEVICE_FAMILY = 3;
537534
TVOS_DEPLOYMENT_TARGET = 9.0;
538535
};

β€ŽSwiftyImage.xcodeproj/xcshareddata/xcschemes/SwiftyImage-tvOS.xcschemeβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

β€ŽSwiftyImage.xcodeproj/xcshareddata/xcschemes/SwiftyImage.xcschemeβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

0 commit comments

Comments
Β (0)