Does swift playground support UIKit?

前端 未结 10 1192
花落未央
花落未央 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:24

    In Xcode 8 XCPlaygroundPage.currentPage.liveView is deprecated. Instead, use

    import PlaygroundSupport 
    
    PlaygroundPage.current.liveView = view
    

提交回复
热议问题