Why doesn't this cast require a bridge under ARC?

Why does listing CGImageRef for an object pointer not require memory management information (__bridge, etc.)? For example, if the image is of type UIImage *, and the layer is a layer under UIView, then the following line of code does not cause any complaints from the compiler:

layer.content = (id)[image CGImage];
+5
source share
1 answer

Quote Go to ARC Release Notes :

The compiler processes CF objects returned from Cocoa Methods

Objective-C, Core Foundation Cocoa (. Advanced ). , iOS, CGColor, CGColor UIColor, . , ...

(, cocoa -touch, !).

CGImage CoreFoundation, __bridge .

+6

All Articles