How to print to console using swift playground?

后端 未结 7 628
余生分开走
余生分开走 2020-11-27 03:57

I have been following the Apple Guide for their new language swift, but I don\'t understand why the bar on the right is only showing \"Hello, playground\" and not \"Hello, w

7条回答
  •  生来不讨喜
    2020-11-27 04:17

    Just Press Alt + Command + Enter to open the Assistant editor. Assistant Editor will open up the Timeline view. Timeline by default shows your console output.

    Additionally You can add any line to Timeline view by pressing the small circle next to the eye icon in the results area. This will enable history for this expression. So you can see the output of the variable over last 30 secs (you can change this as well) of execution.

提交回复
热议问题