xcode Swift:如何在 Playground 中绘制 UI?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24008235/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:58:18  来源:igfitidea点击:

Swift: How to draw UIs in Playground?

xcodeswift

提问by mengto

How to draw UIs (Rectangle, Buttons, Views, etc) and view the results in real-time, as shown here: https://devimages.apple.com.edgekey.net/swift/images/swift-screenshot.jpg? All I can see is the Console Output, but I can't find the option to show the visual display (Balloons) and the chart.

如何绘制 UI(矩形、按钮、视图等)并实时查看结果,如下所示:https: //devimages.apple.com.edgekey.net/swift/images/swift-screenshot.jpg?我只能看到控制台输出,但我找不到显示视觉显示(气球)和图表的选项。

采纳答案by rickster

Charts appear in the Assistant editor when you have something like a forloop, or for anything where you press the quick look or circle/plus buttons when mousing over the results area. See Viewing Results of an Executed Statementin Playground Help.

当您有for循环之类的内容时,或者在将鼠标悬停在结果区域上时按下快速查看或圆圈/加号按钮的任何内容时,图表会出现在“助手”编辑器中。见一个执行的语句查看结果游乐场帮助