A: 

Just checked my own code that is doing the same thing you are. Yours is nearly identical to mine, except that I am asking the view's layer to render instead of the window's, i.e.:

[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];

I don't know why that would make a difference, but it's worth a try.

Chris Garrett
+1  A: 

Solved it by using the just-approved private function UIGetScreenImage().

For more info, please check http://www.tuaw.com/2009/12/15/apple-relents-and-is-now-allowing-uigetscreenimage-for-app-st/ and https://devforums.apple.com/message/149553

Regards,

boliva
A: 

UIGetScreenImage() is quite annoying when you just want to capture a view. I found a nice trick, just re-save all your PNG images into TIFF format using Preview.app :)