Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c don';t重新加载/刷新层和CATextLayer(iphone)_Objective C_Catextlayer - Fatal编程技术网

Objective c don';t重新加载/刷新层和CATextLayer(iphone)

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

我有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.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加入到添加文本之前(将现有文本相互强加),我什么也看不到

谢谢你的帮助