I've been banging my head off a wall trying to figure this problem out. I've added a CATextLayer to a CALayer and after a couple of operations happen i want to change the text of the CATextLayer to something different. Is there a simple way to do that? Below i have some code below which doesn't seem to work.
self.searchingForTextLayer = [CATextLayer layer];
self.searchingForTextLayer.bounds = CGRectMake(0.0f, 0.0f, 100.0f, 30.0f);
self.searchingForTextLayer.string = @"Searching for..";
self.searchingForTextLayer.fontSize = 12;
//TextLayer.font = [UIFont boldSystemFontOfSize:18].fontName;
self.searchingForTextLayer.backgroundColor = [UIColor clearColor].CGColor;
self.searchingForTextLayer.position = CGPointMake(80.0, 40.0f);
self.searchingForTextLayer.wrapped = NO;
[self.captureVideoPreviewLayer addSublayer:self.searchingForTextLayer];
and later i call this in a method
self.searchingForTextLayer.string = @"Search complete";
but calling this doesnt change the text on screen.
Any help would be great!