Objective c don';t重新加载/刷新层和CATextLayer(iphone)
我有layer和CATextLayer。 我有代码,例如:Objective c don';t重新加载/刷新层和CATextLayer(iphone),objective-c,catextlayer,Objective C,Catextlayer,我有layer和CATextLayer。 我有代码,例如: CATextLayer *TextLayer = [CATextLayer layer]; TextLayer.bounds = CGRectMake(0.0f, 0.0f, 245.0f, 290.0f); TextLayer.string = randomText; CTFontCreateWithName((CFStringRef)@"HelveticaNeue-Light", 0
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];
如何在添加文本之前重新加载/刷新或清除图层?
目前,textRandom加入到添加文本之前(将现有文本相互强加),我什么也看不到
谢谢你的帮助