jjzjj

subTitleLayer

全部标签

swift - CATextLayer 忽略字体大小

我想为我的图像创建一个文本叠加层。问题是,如果我尝试添加第二个文本,比如字幕,它会忽略我的字体大小。titleLayer.frame=CGRectMake(0,80,imageView.bounds.width,50)subTitleLayer.frame=CGRectMake(0,130,imageView.bounds.width,40)titleLayer.string="Title"subTitleLayer.string="Subtitle"letfontName:CFStringRef="HelveticaNeue"letfontSubName:CFStringRef="H

swift - CATextLayer 忽略字体大小

我想为我的图像创建一个文本叠加层。问题是,如果我尝试添加第二个文本,比如字幕,它会忽略我的字体大小。titleLayer.frame=CGRectMake(0,80,imageView.bounds.width,50)subTitleLayer.frame=CGRectMake(0,130,imageView.bounds.width,40)titleLayer.string="Title"subTitleLayer.string="Subtitle"letfontName:CFStringRef="HelveticaNeue"letfontSubName:CFStringRef="H