Render CAEmitterLayer (somehow)

346 views Asked by At

I really need to capture a CAEmitterLayer as an image to render in my context. I know that renderInContext method does not suport CAEmitterLayer, i have found many questions about it but no good answers.

I was able to achieve my goal by using new iOS7 method drawViewHierarchyInRect, it worked just fine, but i need my app running on iOS6 as well.

There is any way at all to do that? Can i, programmatically, take a screenshot like when i press homebutton + powerbutton on device?

Any help will be useful, i'm on a dead alley with this.

1

There are 1 answers

3
wendy On

I got the same problem, the CAEmitterLayer can not be "renderincontext", but i read a blog, at last the author said there is a way to draw it,and output a image to show,here is the blog for you. http://www.raywenderlich.com/6063/uikit-particle-systems-in-ios-5-tutorial