ios - CAScrollLayer not working on Video -
i trying create image animation on video of cascrolllayer
able add images on cascrolllayer
it's not scrolling when video played appreciable below code have tried far.
calayer *layer; // self.view = [[uiview alloc] initwithframe:cgrectmake(0, 0, 320, 460)]; scrolllayer = [cascrolllayer layer]; scrolllayer.backgroundcolor = [[uicolor blackcolor] cgcolor]; scrolllayer.bounds = parentlayer.bounds; scrolllayer.contentsrect = cgrectmake(0, 0, scrolllayer.bounds.size.width*images.count, scrolllayer.bounds.size.height); scrolllayer.borderwidth = 2.5; scrolllayer.bordercolor = [[uicolor redcolor] cgcolor]; scrolllayer.position = cgpointmake(self.view.center.x, self.view.center.y - 20); scrolllayer.scrollmode = kcascrollhorizontally; scrolllayer.speed = 2.0; // [self.view.layer addsublayer:scrolllayer]; [parentlayer insertsublayer:scrolllayer atindex:0]; for(int i=0; i<[images count]; i++) { uiimage *image = [images objectatindex:i]; layer = [calayer layer]; layer.backgroundcolor = [[uicolor blackcolor] cgcolor]; layer.bounds = cgrectmake(0, 0, 300, 300); layer.contents = (id)[image cgimage]; layer.position = cgpointmake(layer.bounds.size.width * i, self.view.center.y); // scrolllayer.speed = 2.0; [scrolllayer addsublayer:layer]; } [parentlayer addsublayer:scrolllayer]; [self performselector:@selector(scrollpoint) withobject:nil afterdelay:2.0]; compostion.animationtool = [avvideocompositioncoreanimationtool videocompositioncoreanimationtoolwithpostprocessingasvideolayer:videolayer inlayer:parentlayer];
thank you.
Comments
Post a Comment