Does swift playground support UIKit?

前端 未结 10 1187
花落未央
花落未央 2020-12-07 23:54

I tried to create a UILabel in playground but failed. Does playground only support OS X development for now?

10条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-08 00:40

    Most simple solution: Xcode 9.2

    • Start with a new Single View playground:

    • show Assistance Editor: View -> Assistance Editor -> Show Assistance Editor.

    • here you go. By default you will see printed property: label.text = "Hello World!" in the Live View window

提交回复
热议问题