您当前的位置: 首页 >  ui

Swift3的playground中对UI直接测试支持的改变

发布时间:2016-07-19 18:08:16 ,浏览量:0

我们知道在Xcode的playground中不仅可以测试console代码,还可以测试UI代码,甚至我们可以测试SpriteKit中的场景,有兴趣的童鞋可以看我之前写的这一篇blog:

Xcode的playground中对于SpriteKit物理对象的更新为何无效

而在本篇中我们只是简单聊一聊最新的Xcode8.0 beta2(以下简称Xcode8b2)中playground对UIKit支持有了哪些改变.

首先贴出以下小段演示代码:

// 1 import UIKit
import XCPlayground // 2 class Responder: NSObject {

  func tap() {
    print("Button pressed")
  }
} let responder = Responder() // 3 let button = UIButton(type: .System) button.setTitle("Button", forState: .Normal)
bu
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    107781博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0848s