【发布时间】:2018-03-18 07:38:36
【问题描述】:
我可以在 AR 环境中显示 SCNText,但是当我尝试将文本包装在固定宽度和高度的容器中时,而不是在多行中显示它会重叠。
let text = SCNText(string: ktext, extrusionDepth: 0.0)
text.name = "text"
text.firstMaterial?.diffuse.contents = color
text.font = UIFont(name: fontName, size: size)
text.truncationMode = kCAAlignmentCenter
text.isWrapped = true
text.truncationMode = kCATruncationMiddle
text.containerFrame.size = CGSize(width: 3, height: 1)
【问题讨论】:
-
您找到解决方案了吗?
-
是的,正在调整字体大小。
-
更大的字体和更小的比例因子。 forums.developer.apple.com/thread/85368
-
我们怎样才能让文本水平换行?在 X 轴上?
标签: ios iphone scenekit augmented-reality arkit