\n not working in Sklabel SpriteKit

前端 未结 4 2301
滥情空心
滥情空心 2021-02-20 10:53

I have been using the following code in my game. The Problem is that i am unable to make multi-line label in spritekit as i was able to do using CCLabelTTF...... Can Somebody he

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-20 11:25

    You can use NSLayoutManager to line-break the string to match a desired width, as hinted by this question.

    Note that NSLayoutManager is available on iOS beginning with iOS 7.

提交回复
热议问题