I have layer and CATextLayer. I have code, e.g:
CATextLayer *TextLayer = [CATextLayer layer];
TextLayer.bounds = CGRectMake(0.0f, 0.0f, 245.0f, 290.0f);
TextLayer.string = randomText;
CTFontCreateWithName((CFStringRef)@"HelveticaNeue-Light", 0.0, NULL);
TextLayer.backgroundColor = [UIColor blackColor].CGColor;
TextLayer.position = CGPointMake(162.0, 250.0f);
TextLayer.wrapped = YES;
TextLayer.fontSize = 20;
[self.view.layer addSublayer:TextLayer];
How can I reload/refresh or clear layer before add randomText? At the moment textRandom join to before add text (imposition of existing texts on each other) and I don't see anything.
Thanks for help!