catextlayer の特定のセクションをさまざまなサイズ、色で定義する方法と、改行を追加する方法について頭を悩ませていますか?
テキストのページを次のようにフォーマットする必要があります。
タイトル (サイズ 20 HelveticaNeue-Light、黒)
/n 改行
Para 1 (サイズ 15 HelveticaNeue-Light、黒)
/n 改行
para 2 (サイズ 15 HelveticaNeue-Light、カスタムカラー)
現時点では、タイトル テキストしかありません。誰か助けてもらえますか?
CATextLayer *TextLayer = [CATextLayer layer];
TextLayer.bounds = CGRectMake(0.0f, 0.0f, 245.0f, 290.0f);
TextLayer.string = @"Title";
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];