On Wed, 06 Apr 2011 18:44:04 +0800, Gabriel Zachmann <z...@tu-clausthal.de> said: >I am creating CA layers like so: > > CALayer * imgLayer = [CALayer layer]; > imgLayer.contents = (id) image; > imgLayer.contentsGravity = kCAGravityResizeAspect; > imgLayer.delegate = nil; > imgLayer.opacity = 1.0; > imgLayer.position = CGPointMake( drawRect_.size.width/2.0, > drawRect_.size.height/2.0 ); > imgLayer.anchorPoint = CGPointMake( 0.5, 0.5 ); > imgLayer.zPosition = -1.0; > >Now, sometimes, the image does not get displayed (most images do get >displayed).=
What is "image"? If it is not a CGImageRef, setting the layer's contents will fail *silently*. I wish I had a nickel for every time I assigned a UIImage to a layer's contents and then wasted a day trying to figure out why I couldn't see the layer in the interface.... m. -- matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/> A fool + a tool + an autorelease pool = cool! Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com