当前位置:首页 > 操作系统 > Ios

写第一个 swift,iOS 8.0程序

class ViewController: UIViewController {
                            
    @IBAction func btn_click(sender : AnyObject) {
        println("click");
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

开发起来和OC一样,将btn的单击事件拖拽到 class 里面。

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!