2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CATextLayer usage

Posted at
CATextLayer *textLayer = [CATextLayer layer];
    [textLayer setFrame:CGRectMake(0, 5, kScreenWidth, 40)];
//    [textLayer setPosition:POINT(CGRectGetWidth(_topView.frame) / 4, 20)];
    [textLayer setString:@"下单       已支付       已发货       收货"];
    [textLayer setForegroundColor:[UIColor grayColor].CGColor];
    [textLayer setContentsScale:2.f];
    [textLayer setWrapped:YES];
    [textLayer setAlignmentMode:kCAAlignmentCenter];
    [textLayer setFontSize:16.f];
    
    [_viewForTextLayer.layer addSublayer:textLayer];
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?