File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 10591059 MTL_ENABLE_DEBUG_INFO = YES;
10601060 ONLY_ACTIVE_ARCH = YES;
10611061 SDKROOT = iphoneos;
1062+ SWIFT_VERSION = 2.3;
10621063 };
10631064 name = Debug;
10641065 };
10971098 MTL_ENABLE_DEBUG_INFO = NO;
10981099 SDKROOT = iphoneos;
10991100 SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1101+ SWIFT_VERSION = 2.3;
11001102 VALIDATE_PRODUCT = YES;
11011103 };
11021104 name = Release;
Original file line number Diff line number Diff line change @@ -32,15 +32,23 @@ extension NetworkingImage {
3232
3333 func pngData( ) -> NSData ? {
3434 #if os(OSX)
35- return self . data ( type: . PNG)
35+ #if swift(>=2.3)
36+ return self . data ( type: . PNG)
37+ #else
38+ return self . data ( type: . NSPNGFileType)
39+ #endif
3640 #else
3741 return UIImagePNGRepresentation ( self )
3842 #endif
3943 }
4044
4145 func jpgData( ) -> NSData ? {
4246 #if os(OSX)
43- return self . data ( type: . JPEG)
47+ #if swift(>=2.3)
48+ return self . data ( type: . JPEG)
49+ #else
50+ return self . data ( type: . NSJPEGFileType)
51+ #endif
4452 #else
4553 return UIImageJPEGRepresentation ( self , 1 )
4654 #endif
You can’t perform that action at this time.
0 commit comments