import UIKit
class ViewController: UIViewController {
@IBOutlet var countLabel: UILabel!
var resultBox = 0
override func viewDidLoad() {
super.viewDidLoad()
countLabel.backgroundColor = UIColor.blue
}
@IBAction func puls(_ sender: Any) {
resultBox += 1
// countLabelのtextに整数を文字列に変換して入れる事
countLabel.text = String(resultBox)
}
@IBAction func minus(_ sender: Any) {
resultBox -= 1
countLabel.text = String(resultBox)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}