Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以将 SKLabelNode 上的 fontSize 设置为某个动态值,使其成为最大允许值,以便显示整个文本。
每当标签更新时,只需调用一个方法 say :adjustLabel。在那里面
:adjustLabel
- (void)adjustLabel{ label.text = //Your Text; label.fontSize = //Your fontSize; label.position = // Your position; // whatever attributes of the label you want to change, add them here. }