编程语言
首页 > 编程语言> > 写第一个 swift,iOS 8.0程序

写第一个 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 里面。

标签:8.0,func,iOS,click,viewDidLoad,didReceiveMemoryWarning,btn,swift,any
来源: https://www.cnblogs.com/ldxsuanfa/p/10868734.html