I did this in awakeFromNib:
drawLayer = [CALayer layer];
self.layer = drawLayer;
[self setWantsLayer:YES];
there is a "add:" action
// some business logic
[drawLayer addSublayer:layer];
[self layout];
-(void)layout
while(pg = [pageEnumr nextObject])
{
//rect is calculated so that layers are added in order (left to right)
[pg setFrame:rect];
}
I want the sublayers to be added from to top left side of the superLayer (CALayer of view) but they are added from bottom left
I tried affineTranform
CGAffineTransform trans = CGAffineTransformMake(1.0,0.0,0.0,-1.0,0.0,0.0);
self.layer.affineTransform = trans;
but scrolling make disappearing of my subLayers
I used transform
CATransform3D aTransform = CATransform3DIdentity;
aTransform = CATransform3DMakeRotation(M_PI, 1, 0, 0);
self.layer..transform = aTransform;
I have to apply the transform to counter rotate the subLayers and after adding some 100 sublayers , scrolling becomes slow and application becomes unresponsive
if I don't apply any transform(no affine or no transform ) then application is fast even after addding 1000 sublayers
My application has to host huge number of layers of varying size. help me how to make the hosting layer take flipped co-ordinates ...