编辑代码

@ojbc func buttconCheck(_sender : UIButton){
    let tipsLabel = self.view.viewWithtag(1001) as! UILabel
    let tag = sender.tag
    if tag >= 5000{
        let row = Int((tag -5000)/cols)
        let col = tag - 5000 -cols*row
        print("Bottom(\(row),\(col)")
        tipsLabel.text = "Bottom(\(row),\(col))"

    }
    else if tag >= 4000{
        let row = Int ((tag-4000)/cols)
        let col = tag-4000 -col * row
        print("Top(\(row),\(col))")
        tipsLabel.text = "top(\(row),\(col))"

    }
    else{
        print("Button.tag=\(sender.tag)")
        tipsLabel.text = "Button.tag=\(sender.tag)"
    }
        
    

}