 
             let button: UIButton = UIButton()
             button.tag = index //保存按钮的index
-
             button.setTitle("\(title)", forState: UIControlState.Normal)
 
             button.backgroundColor = UIColor.orangeColor()
             button.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal)
-
             button.setTitleColor(UIColor.blackColor(), forState: UIControlState.Highlighted)
 
-            // 为button绑定TouchUpInside事件
-            button.addTarget(self, action: "timeButtonTapped", forControlEvents: UIControlEvents.TouchUpInside)
+            button.addTarget(self, action: "timeButtonTapped:", forControlEvents: UIControlEvents.TouchUpInside)
 
             buttons += [button]
             self.view.addSubview(button)
+
         }
 
         timeButtons = buttons
-
     }
 
     func setupActionButtons() {

    ///Actions & Callbacks
    func startStopButtonTapped(sender: UIButton) {
        isCounting = !isCounting //切换了isCounting的状态
        
        if isCounting {
            createAndFireLocalNotificationAfterSeconds(remainingSeconds)
        } else {

        clearButton!.frame = CGRectMake(10+self.view.bounds.size.width-20-100+20, self.view.bounds.size.height-60, 80, 44)
    }

    ///UI Element
    var timeLabel: UILabel? //显示剩余时间
    var timeButtons: [UIButton]? //设置时间的按钮数组
    var startStopButton: UIButton? //启动/停止按钮
    var clearButton: UIButton? //复位按钮
    let timeButtonInfos = [("1分", 60), ("3分", 180), ("5分", 300), ("秒", 1)]


    //启动或停止倒计时
    //使用Swift的方式来解决状态跟UI的同步问题：使用属性的willSet或didSet方法
    var isCounting: Bool = false {
        willSet(newValue) {
            if newValue {
                timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: "updateTimer:", userInfo: nil, repeats: true)
            } else {
                timer?.invalidate()
                timer = nil
            }

            setSettingButtonsEnabled(!newValue)
        }
    }

    var timer: NSTimer? // 设置定时器

    //使用Swift的方式来解决状态跟UI的同步问题：使用属性的willSet或didSet方法
    var remainingSeconds: Int = 0 {

        willSet(newSeconds) {
            let mins = newSeconds / 60
