From 0bb481c93e27b0df48802a0d218def64f3fb7ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 6 Sep 2015 19:30:37 +0200 Subject: [PATCH] Remove UIImage experiment --- GRDB.xcodeproj/project.pbxproj | 10 ---------- GRDB/UIKit/UIImage.swift | 28 ---------------------------- 2 files changed, 38 deletions(-) delete mode 100644 GRDB/UIKit/UIImage.swift diff --git a/GRDB.xcodeproj/project.pbxproj b/GRDB.xcodeproj/project.pbxproj index 9e6b7a16f..76617755b 100644 --- a/GRDB.xcodeproj/project.pbxproj +++ b/GRDB.xcodeproj/project.pbxproj @@ -158,7 +158,6 @@ 5623E0901B4AFACC00B20B7F /* GRDBTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GRDBTestCase.swift; sourceTree = ""; }; 5683C2681B4D445E00296494 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libsqlite3.dylib; sourceTree = DEVELOPER_DIR; }; 56997A8D1B5390D4005EBEED /* DatabaseErrorFromSelectStatementTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseErrorFromSelectStatementTests.swift; sourceTree = ""; }; - 56A237FE1B9C69E60082EB20 /* UIImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImage.swift; sourceTree = ""; }; 56A238011B9C6A650082EB20 /* DatabaseDateComponents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseDateComponents.swift; sourceTree = ""; }; 56A238041B9C6D670082EB20 /* NSDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSDate.swift; sourceTree = ""; }; 56A238081B9C6DD20082EB20 /* StandardLibraryTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StandardLibraryTypes.swift; sourceTree = ""; }; @@ -296,14 +295,6 @@ path = DatabaseError; sourceTree = ""; }; - 56A237FD1B9C69DA0082EB20 /* UIKit */ = { - isa = PBXGroup; - children = ( - 56A237FE1B9C69E60082EB20 /* UIImage.swift */, - ); - path = UIKit; - sourceTree = ""; - }; 56A238001B9C6A1E0082EB20 /* Foundation */ = { isa = PBXGroup; children = ( @@ -557,7 +548,6 @@ 56A238911B9C750B0082EB20 /* Migrations */, 56A2389F1B9C753B0082EB20 /* RowModel */, 56A238071B9C6DAD0082EB20 /* Swift */, - 56A237FD1B9C69DA0082EB20 /* UIKit */, DC37743319C8CFCE004FCF85 /* Supporting Files */, ); path = GRDB; diff --git a/GRDB/UIKit/UIImage.swift b/GRDB/UIKit/UIImage.swift deleted file mode 100644 index 555932f1b..000000000 --- a/GRDB/UIKit/UIImage.swift +++ /dev/null @@ -1,28 +0,0 @@ -import UIKit - -// UIImage experiment. -// This code is not included in any public target. -extension UIImage : DatabaseValueConvertible { - /// Returns a value that can be stored in the database. - public var databaseValue: DatabaseValue { - if let data = UIImagePNGRepresentation(self) { - return data.databaseValue - } else { - return .Null - } - } - - /** - Returns an UIImage initialized from *databaseValue*, if possible. - - - parameter databaseValue: A DatabaseValue. - - returns: An optional UIImage. - */ - public static func fromDatabaseValue(databaseValue: DatabaseValue) -> Self? { - if let data = NSData.fromDatabaseValue(databaseValue) { - return self.init(data: data) - } else { - return nil - } - } -}