onevcat před 10 roky
rodič
revize
f0d0e2e925

+ 1 - 1
Demo/Kingfisher-watchOS-Demo Extension/InterfaceController.swift

@@ -41,7 +41,7 @@ class InterfaceController: WKInterfaceController {
         super.awakeWithContext(context)
         super.awakeWithContext(context)
         
         
         currentIndex = count
         currentIndex = count
-        count++
+        count += 1
     }
     }
     
     
     func refreshImage() {
     func refreshImage() {

+ 2 - 2
Sources/Image.swift

@@ -286,8 +286,8 @@ extension Image {
         let imageRef = self.CGImage
         let imageRef = self.CGImage
         let colorSpace = CGColorSpaceCreateDeviceRGB()
         let colorSpace = CGColorSpaceCreateDeviceRGB()
         let bitmapInfo = CGBitmapInfo(rawValue: CGImageAlphaInfo.PremultipliedLast.rawValue).rawValue
         let bitmapInfo = CGBitmapInfo(rawValue: CGImageAlphaInfo.PremultipliedLast.rawValue).rawValue
-        let contextHolder = UnsafeMutablePointer<Void>()
-        let context = CGBitmapContextCreate(contextHolder, CGImageGetWidth(imageRef), CGImageGetHeight(imageRef), 8, 0, colorSpace, bitmapInfo)
+        
+        let context = CGBitmapContextCreate(nil, CGImageGetWidth(imageRef), CGImageGetHeight(imageRef), 8, 0, colorSpace, bitmapInfo)
         if let context = context {
         if let context = context {
             let rect = CGRect(x: 0, y: 0, width: CGImageGetWidth(imageRef), height: CGImageGetHeight(imageRef))
             let rect = CGRect(x: 0, y: 0, width: CGImageGetWidth(imageRef), height: CGImageGetHeight(imageRef))
             CGContextDrawImage(context, rect, imageRef)
             CGContextDrawImage(context, rect, imageRef)