I know it has answered here, but I cannot get it work.
I have some puzzlePiece CALayer subclass instance, each with 4 additional sublayer. When user manupulates a piece, its sublayers get changed. But after manipulating finished, user can only move these pieces.
I want to make somehow a "snapshot" of the sublayers after user finished manipulating, then hide the sublayers and display only this collapsed copy, so the performance of the movement could be far better (a one-layered CALayer moves faster than a 4-layered one).
My approach was to attach a 5th sublayer to the piece, then set its contents to the freshly made snapShot (made with renderInContext) then hide sublayers, but it remains empty, aint no any snapshots.
I hate see my pieces lagging during drag. Any working example?