Closed gyf-lancelot closed 9 years ago
// // ViewController.swift // 2048 lance // // Created by lancelot on 15-10-17. // Copyright (c) 2015 gongchengxiaofendui. All rights reserved. //
import UIKit
class ViewController: UIViewController {
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.
}
@IBAction func startgamebuttontapped(sender : UIButton) {
let alertView = UIAlertView()
alertView.title = "start!"
alertView.message = "Are you ready?"
alertView.addButtonWithTitle("ready go!")
alertView.show()
}
}
游戏开始界面,放置了一个开始游戏按钮,并可以响应按钮事件
1.在界面上放置开始游戏按钮 2.响应按钮事件