func addButton(view:UIView,rect:CGRect,fileName:String,tag:Int) {
let img = UIImage(named: fileName)
let btn = UIButton(frame: rect)
btn.setImage(img, for: .normal)
var mytag = tag
if mytag >= 5000 f
mytag -= 5000
}
else if mytag >= 4000
mytag -= 4000
}
let row = Int (mytag / cols)
let col = mytag - cols * row
let result = errorCords.filter (
$0 == (row,col)
}
if result.count >= 1 && TipsFlag
btn.backgroundColor=.blue
btn.tag = tag
btn.addTarget(self, action: #selector(buttonCheckMusicTimer(_:)),
for: .touchUpInside)
view.addSubview(btn)
}
let result1 = cords.filter{
$0 ==(row,col)
}