CGImage from Swift to Objective C

214 views Asked by At

I got following troubling problem: I want to transfer a CGImage from Swift into Objective C. It just doesn't work

That's the call

func transferImage(cgImage: CGImage) {
objcobject.cgimage = cgImage
}

That's the objc header:

@property (nonatomic, assign) CGImageRef *cgimage;

This gives my the build time error: "Cannot assign value of type 'CGImage' to type 'UnsafeMutablePointer?>?'"

Does anybody know how to get a CGImage safely and properly from swift into objective c? CGImage doesn't work, CGImageRef doesn't work. I'm pretty desperate!

0

There are 0 answers