Skip to content
This repository was archived by the owner on Mar 10, 2022. It is now read-only.

Commit 8baede5

Browse files
author
Chris Combs
committed
Swift 2.3 update
1 parent 548e2fe commit 8baede5

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

QRIO.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,11 @@
151151
TargetAttributes = {
152152
838FB5641D26A45E0065A950 = {
153153
CreatedOnToolsVersion = 7.3.1;
154+
LastSwiftMigration = 0800;
154155
};
155156
838FB56E1D26A45E0065A950 = {
156157
CreatedOnToolsVersion = 7.3.1;
158+
LastSwiftMigration = 0800;
157159
};
158160
};
159161
};
@@ -327,6 +329,7 @@
327329
PRODUCT_NAME = "$(TARGET_NAME)";
328330
SKIP_INSTALL = YES;
329331
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
332+
SWIFT_VERSION = 2.3;
330333
};
331334
name = Debug;
332335
};
@@ -345,6 +348,7 @@
345348
PRODUCT_BUNDLE_IDENTIFIER = com.nodes.QRIO;
346349
PRODUCT_NAME = "$(TARGET_NAME)";
347350
SKIP_INSTALL = YES;
351+
SWIFT_VERSION = 2.3;
348352
};
349353
name = Release;
350354
};
@@ -355,6 +359,7 @@
355359
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
356360
PRODUCT_BUNDLE_IDENTIFIER = com.nodes.QRIOTests;
357361
PRODUCT_NAME = "$(TARGET_NAME)";
362+
SWIFT_VERSION = 2.3;
358363
};
359364
name = Debug;
360365
};
@@ -365,6 +370,7 @@
365370
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
366371
PRODUCT_BUNDLE_IDENTIFIER = com.nodes.QRIOTests;
367372
PRODUCT_NAME = "$(TARGET_NAME)";
373+
SWIFT_VERSION = 2.3;
368374
};
369375
name = Release;
370376
};

QRIO/QRIO.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ public extension UIImage {
9898

9999
let qrImage = resultImage.imageByApplyingTransform(CGAffineTransformMakeScale(scaleX, scaleY))
100100
let context = CIContext(options: nil)
101-
let tempImage: CGImageRef = context.createCGImage(qrImage, fromRect: qrImage.extent)
102-
return UIImage(CGImage: tempImage)
101+
if let tempImage: CGImageRef = context.createCGImage(qrImage, fromRect: qrImage.extent) {
102+
return UIImage(CGImage: tempImage)
103+
}
104+
return nil
103105
}
104106
}

0 commit comments

Comments
 (0)